problem with shell script

Frank Bonnet f.bonnet at
Wed Jan 12 14:16:59 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 !

More information about the freebsd-questions mailing list