Date: Wed, 12 Jan 2011 14:17:24 +0000 From: four.harrisons@googlemail.com To: freebsd-questions@freebsd.org Subject: problem with shell script Message-ID: <4d2ef151.4310df0a.25b7.0199@mx.google.com>
next in thread | raw e-mail | index | archive | help
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@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4d2ef151.4310df0a.25b7.0199>
