[TriLUG] Perl question. . .
Kevin Hunter
hunteke at earlham.edu
Tue Feb 17 15:25:21 EST 2009
At 3:17pm -0500 on Tue, 17 Feb 2009, Michael Peters wrote:
> Brian Henning wrote:
>> There's undoubtedly a more elegant way...
>
> Or at least a different way :)
And yet another way ... If it doesn't have to be perl, you could try:
$ grep file "unique part of line" > newfile
$ grep -E file "regex to match line" > newfile
or as part of a pipeline:
$ cat file | grep -E "regex" > newfile
Cheers,
Kevin
More information about the TriLUG
mailing list