[BusyBox] ash and grep with busybox 1.00
Florian Fainelli
florian at alphacore.net
Mon Feb 21 16:12:49 UTC 2005
Hi !
I would like grep to return me only one line, it is possible to do that ? eg :
ps aux | grep -c "/usr/sbin/telnetd"
1
ps aux | grep -c "/usr/sbin/telnetd"
2
It's pretty unpredictable :) I could use sed to return me only one line, but I
does fit to my needs.
Then, why does ash gives me an error when attempting to do that :
if [ `ps aux | grep -c telnet` >= "1" ]; then
tel="on"
else
tel="off"
fi
ash does not like >= operator ? Or am I wrong with the ash operators ?
Thanks for your answers.
--
Cordialement, Florian
Association Nantes-Wireless
www.nantes-wireless.org
www.alphacore.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20050221/10a0c59c/attachment-0002.pgp
More information about the busybox
mailing list