[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Job queing
From: |
Bob Proulx |
Subject: |
Re: Job queing |
Date: |
Mon, 21 Aug 2006 09:23:42 -0600 |
User-agent: |
Mutt/1.5.9i |
Mårten Segerkvist wrote:
> command1 &
> %1 && command2 &
> %2 && command3
>
> (where the second command line awaits the execution of the first etc.)
In a script you can grab the process id of the last background job
with $!. Then you can wait for that job id.
command &
wait $! && command2 &
wait $! && command3 &
Just an idea...
Bob