On Thu, Feb 4, 2010 at 12:13 PM, Robert Citek <[email protected]> wrote:
> On Thu, Feb 4, 2010 at 1:00 AM, Leo jay <[email protected]> wrote:
>> I have 2 shell scripts a.sh and b.sh,
>> I'd like to start them and put them to background.
>> I can do it with 2 commands:
>> sh a.sh &
>> sh b.sh &
>>
>> Is it possible to use only 1 command?
>> I tried
>> sh a.sh & ; sh b.sh &
>
> Close.  Remove the semicolon:
>
> $ sh a.sh & sh b.sh &

Here's an example:

$ sleep 1000 & sleep 2000 &
[1] 19435
[2] 19436

$ jobs
[1]-  Running                 sleep 1000 &
[2]+  Running                 sleep 2000 &

Regards,
- Robert

-- 
You received this message because you are subscribed to the Linux Users Group.
To post a message, send email to [email protected]
To unsubscribe, send email to [email protected]
For more options, visit our group at 
http://groups.google.com/group/linuxusersgroup

Reply via email to