problem with shell script

four.harrisons at four.harrisons at
Thu Jan 13 12:58:32 UTC 2011


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 !

freebsd-questions at mailing list
To unsubscribe, send any mail to "freebsd-questions-unsubscribe at"

More information about the freebsd-questions mailing list