> 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
- Re: [SLUG] Script needed Tony Cook
- Re: [SLUG] Script needed James Wilkinson
- Re: [SLUG] Script needed Aussie
- Re: [SLUG] Script needed Rodos
- Re: [SLUG] Script needed Rodos
- Re: [SLUG] Script needed Anthony Rumble
- Re: [SLUG] Script needed John Ferlito
- Re: [SLUG] Script needed - THANKS! Simon Bryan
- Re: [SLUG] Script needed - THANKS! Rick Welykochy
- Re: [SLUG] Script needed - THANKS! Matthew Dalton
- Re: [SLUG] Script needed Adam Kennedy
- Re: [SLUG] Script needed CaT
- [SLUG] Re: Script needed Angus Lees
