problem with shell script
four.harrisons at googlemail.com
four.harrisons at googlemail.com
Thu Jan 13 12:58:32 UTC 2011
Hello
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
1
If I run in the following shell script :
#!/bin/sh
SD=0
SD=`ps -ax | grep slapd | grep -v grep | wc -l`
echo $SD
the result is 3 !!!
Any info welcome !
_______________________________________________
freebsd-questions at freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"
More information about the freebsd-questions
mailing list