regex help

Kevin plug-discuss at firstpacket.com
Mon Jun 5 16:50:46 MST 2006


On 6/5/06 4:14 PM, "Randy Melder" <randymelder at gmail.com> wrote:
> Anybody have a similar script already made in bash or perl?

Whoa, my mailer got away from me on that last reply.  Let's try this
again...

Randy,
This should do the trick:
grep \< oldfile.txt | awk -F "[<>]" '{print $2}' | tee newfile.txt

You can also remove dupes using the `uniq` cmd:
grep \< oldfile.txt | awk -F "[<>]" '{print $2}' | uniq | tee newfile.txt


...Kevin



More information about the PLUG-discuss mailing list