[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [SLUG] Script needed



> 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 slug-request@nospam.slug.org.au with
unsubscribe in the text