From: andrewc@aurora.cc.monash.edu.au (Andrew J. Cosgriff !) Subject: Re: [BUG] Problems with ps 0.99.2 Date: 12 Jan 1993 08:40:26 GMT
bjones@cambria.columbus.oh.us (Bill Jones) writes:
>Just tried to run a number of shell scripts which depend heavily upon the
>`c' flag in ps. It turns out that in the ps taken from HJ's 0.99.2 rootdisk
>the c flag is absent. This causes shell scripts containing such things as
> while ps auxc | grep uucico > /dev/null
> do
> sleep
> done
>to fail. Instead of passing through with no effect when uucico is not
>running, this will always produce output of `grep uucico' and will therefore
>sleep forever. So all of my uucp cleanup scripts are now not working. Is there
>a workaround to this problem? Thanks,
Certainly - use
while ps aux | grep uucico | grep -v grep > /dev/null
instead.
it's a bit safer that way.
Enjoy !
Cos !
-- =============================================================================== * Andrew J. Cosgriff ! * #include <std_witty_quote.h> #define HERE cc.monash.edu.au #include <std_disclaimer.h> Hassle me at : andrewc@aurora.HERE ; andrewc@lindblat.HERE ; cos@yoyo.HERE