Charles, David,

> From: "Charles Steinkuehler" <[EMAIL PROTECTED]>
> Date: Thu, 1 Nov 2001 08:19:37 -0600
> 
<snip>

> > grep doesn't do "-v" or (I think) "-q".

Thanks, both of you!


> The "grep" provided with many LEAF/LRP verisons is actually a shell-script
> wrapper that uses sed.  Typically, no switches are supported, and no status
> is returned based on 'found' or 'not found'.  Some newer distributions use
> the busybox grep function, which should support the switches you want to
> use.

> As David pointed out, you can generally use sed instead of grep to do what
> you want, but if your system doesn't have the busybox grep, you probably
> don't have the wc function either...
> 
> You can generally replace 'wc -l' with sed -n '$=', although you won't get a
> zero output if there are no lines.
> 
> You might also want to do something like:
> ps ax | sed -n '/sed/d;\:/usr/sbin/pppd:p'
> 
> The single sed command first deletes any lines containing 'sed', then prints
> any lines containing '/usr/sbin/pppd'.  You could simply test the output of
> this for non-zero length to see if pppd is running:
> if [ -n "`ps ax | sed -n '/sed/d;\:/usr/sbin/pppd:p'`" ] ...

Charles, clear and helpful!


Greetings

Mark

_______________________________________________
Leaf-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/leaf-user

Reply via email to