[prev in list] [next in list] [prev in thread] [next in thread]
List: busybox
Subject: Re: [BusyBox] ash and grep with busybox 1.00
From: Rob Landley <rob () landley ! net>
Date: 2005-02-22 7:05:41
Message-ID: 200502220205.48805.rob () landley ! net
[Download RAW message or body]
On Monday 21 February 2005 11:07 am, Peter Kjellerstedt wrote:
> > It's pretty unpredictable :) I could use sed to return me
> > only one line, but I does fit to my needs.
>
> The reason you sometimes get 1 and sometimes 2, is probably
> due to whether grep has triggered on itself in the list of
> processes or not.
The way I've always worked around this is to split it into two commands:
TMPVAL=`ps ax`
echo "$TMPVAL" | grep rutabega
It's not a busybox problem, it's a standard race condition instantiating
multiple processes in a pipeline while checking the process list...
Rob
_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic