Subject: Re: Bourne Shell question
To: Bob Nestor <rnestor@augustmail.com>
From: Robert Elz <kre@munnari.OZ.AU>
List: current-users
Date: 12/17/2003 18:30:28
    Date:        Tue, 16 Dec 2003 17:40:16 -0600
    From:        Bob Nestor <rnestor@augustmail.com>
    Message-ID:  <33A77860-3021-11D8-BEA7-0003939C8E82@augustmail.com>

  | The attached script demonstrates the problem.

Not for me it doesn't - it works just the way you want it to (regardless
of whether the arg to sleep is corrected, so you actually get 5*N, or left
as is, so all the sleeps end up being just "5" (and the "*N" part gets 
ignored)).

Which system (version) are you using, on what platform?

kre

ps: one output appended - all the same for uncorrected sleep, and what's
more, also the same for bash & ksh (the pids vary of course).

sh f.sh
Job 0 started, id=9799
Job 1 started, id=23108
Job 2 started, id=24779
Job 3 started, id=17489
Waiting for all jobs to complete
Wait for Job 0, status should be: 0
Job 0 completed, exit status: 0
Wait for Job 1, status should be: 1
Job 1 completed, exit status: 1
Wait for Job 2, status should be: 2
Job 2 completed, exit status: 2
Wait for Job 3, status should be: 3
Job 3 completed, exit status: 3
All jobs completed