siffland has asked for the wisdom of the Perl Monks concerning the following question:
I need some help with pcre grep, I am unsure if it is OK to post for help here, so please tell me if it is not.
Here is what i am trying to accomplish. I need to grep anything out of the /etc/passwd with a UID of 205 or greater and that does not start with a - . The software we are using, cfengine, requires the use of a pcre. So far i have:
pcregrep -v ".*:.*:(-|1)?[0-9]{1,2}:.*:.*:.*" /etc/passwd
But that yields anything above 200, any help would be appreciated.
If anyone know any great webpages for pcre grep I would love to be pointed that direction. I am not that great with perl regular expressions, but would like to learn more.
Thanks,
Sean
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: pcre grep
by duelafn (Parson) on Jun 10, 2010 at 14:42 UTC | |
|
Re: pcre grep
by linuxer (Curate) on Jun 10, 2010 at 20:43 UTC |