> perl -F: -anle 'print $F[0]' </etc/passwd
>
> > perl -e 'print grep { s/^(\w+)\:.*$/$1/; 1; } <>' < inputfile >
outputfile
> >

True, but that is a way of applying any arbitrary regex...
Comes in very handy for doing lots of other things too.

More complicated, but more powerfull.

Adam


--
SLUG - Sydney Linux Users Group Mailing List - http://www.slug.org.au
To unsubscribe send email to [EMAIL PROTECTED] with
unsubscribe in the text

Reply via email to