[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problems substituting 'jobs' in a bash script
From: |
Robert Whent (rwhent) |
Subject: |
problems substituting 'jobs' in a bash script |
Date: |
Thu, 21 Feb 2008 18:59:34 +0100 |
I am having real problems in retrieving the response from 'jobs' after
backgrounding a number of jobs
sleep 100 &
sleep 200 &
sleep 300 &
JOBS=`jobs`
echo $JOBS
this return nothing at all
If I access bash from the command line though, I can manually execute
the same commands and see the jobs ok
In the same script I can retrieve responses from other commands such as
`ls`
I have tried many things but am at a loss to see why this substitution
fails to work ???
I have also trawled the web and can find no reports of any issues ?
Regards,
Rob
- problems substituting 'jobs' in a bash script,
Robert Whent (rwhent) <=