[EMAIL PROTECTED] wrote:

>I find that in many cases I need my background tasks to be executed in
>sequence. Ie, I need background task-b to start right after background
>task-a has properly started. 

>So far I haven't found a good way to do it. I used

> task-a & sleep 2; task-b &

>but that 'sleep 2' has changed to 'sleep 5' and still sometimes task-b
>starts before task-a.

{ task-a ; task-b ; } &

For some reason that second semicolon is needed.

You could do

( task-a ; task-b ) &

but that is needlessly forking an extra time.

Put as many tasks in sequence separated by semicolons with the braces
to extend the task list.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to