problem with shell script
sunckell at gmail.com
Wed Jan 12 15:15:49 UTC 2011
On Wed, Jan 12, 2011 at 9:01 AM, Frank Bonnet <f.bonnet at esiee.fr> wrote:
> I'm in trouble with a simple shell script that give
> erroneous value when running ...
> If I run commands interactively everything runs well
> > ps ax | grep slapd | grep -v grep | wc -l
> If I run in the following shell script :
> SD=`ps -ax | grep slapd | grep -v grep | wc -l`
> echo $SD
> the result is 3 !!!
> Any info welcome !
What's the name of your script? Hope it's not slapd_check.sh that will
cause and extra count in the ps, cus it will count itself.
> freebsd-questions at freebsd.org mailing list
> To unsubscribe, send any mail to "
> freebsd-questions-unsubscribe at freebsd.org"
A grasshopper walks into a bar and the bartender says "Hey, we have a drink
named after you." And the grasshopper says "Really, You have a drink named
More information about the freebsd-questions