[GLLUG] Questions about shell scripting
Mike Szumlinski
szumlins at mac.com
Fri Jun 15 07:03:25 EDT 2012
The way I've always worked around asynchronous calls in shell is by building multiple shell scripts and then firing "monitor" scripts that poll a file in the filesystem with information.
As Clay said, it is far from optimal, but sometimes you only have certain tools to work with so you have to make due.
On Jun 15, 2012, at 6:59 AM, Clay Dowling wrote:
> On 6/14/2012 6:20 PM, David Lee Lambert wrote:
>>
>> 2 quick questions:
>>
>> 1: Is it possible to run a shell function in the background with "&"?
>>
>> 2: What's a good idiom for starting several jobs in the background, then waiting for them all to complete, returning nonzero and printing an error if any of them fail?
>>
> This doesn't sound like a great task for a shell script. A python script or C program, on the other hand, can do this without breaking a sweat if you look up process control in any manual (either the Python book by O'Rielly or "Programming in the Unix Environment").
>
> Clay
> _______________________________________________
> linux-user mailing list
> linux-user at egr.msu.edu
> http://mailman.egr.msu.edu/mailman/listinfo/linux-user
More information about the linux-user
mailing list