[wellylug] Some help with grep

Jamie Dobbs jamie.dobbs at orcon.net.nz
Tue Jun 22 09:01:49 NZST 2004


Thanks for that. Another question now :-)
I'm pretty much a Perl newbie and would like to do a search similar to
this but use logic like thisL

find any occurance of the word 'Yes', then on the same line any occurance
of the word 'word1' or the word 'word2' or word 'word3' etc.

I've tried various options that I could think of but obviously Perl
doesn't like the way I think!


>
> Use perl if you want just one command, instead of grep and grep -V:
>
>     perl -ne 'print if /@domain.co.nz/&&!/this_address at domain.co.nz/' <
> file





More information about the wellylug mailing list