[BusyBox] ash and grep with busybox 1.00
Florian Fainelli
florian at alphacore.net
Mon Feb 21 17:04:01 UTC 2005
Thanks Axel for the grep :)
And what about the ash operator >= ? is it a configuration problem ? something
missing ?
Le Lundi 21 Février 2005 15:52, Buttchereit, Axel (XL) a écrit :
> ps aux | grep "expression" | grep -c -v "grep"
>
> :-) Axel
>
> Florian Fainelli wrote:
> > 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.
> >
> >
> > ------------------------------------------------------------------------
> >
> > _______________________________________________
> > busybox mailing list
> > busybox at mail.busybox.net
> > http://busybox.net/mailman/listinfo/busybox
--
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/d6c78818/attachment-0002.pgp
More information about the busybox
mailing list