[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: BusyBox Issue?
From:       Paul Smith <paul () mad-scientist ! net>
Date:       2014-02-14 17:10:58
Message-ID: 1392397858.29334.307.camel () pdsdesk
[Download RAW message or body]

On Mon, 2013-11-04 at 17:08 -0800, David White wrote:
> Busy Box is installed on my Android phone and provides grep and pgrep
> on my device. And I note what seems to be an issue. If you look at the
> terminal output in the attached screen shot it appears the both pgrep
> and ps | grep are matching patterns incorrectly. The pattern is X*vnc
> and while this should indeed match the first process shown, I don't
> understand why it is matching the other two (which lack an X or even
> an x in their names).
> 
> So maybe this is a problem in BusyBox?

No.  The grep operations operate on regular expressions (hence the "re"
in their name), not on file globbing expressions.

In file globbing, "X*vnc" means the character X, followed by zero or
more characters, followed by "vnc".

In regular expressions, "X*vnc" means zero or more X characters,
followed by "vnc".

If you want the equivalent of that file globbing expression as a regular
expression you need to use "X.*vnc", which means the character X,
followed by zero or more (*) of any character (.), followed by "vnc".

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic