Date: Wed, 12 Jan 2011 15:01:45 +0100 From: Frank Bonnet <f.bonnet@esiee.fr> To: freebsd-questions@freebsd.org Subject: problem with shell script Message-ID: <4D2DB449.6070901@esiee.fr>
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 !
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4D2DB449.6070901>
