[wellylug] Some help with grep

andrej at paradise.net.nz andrej at paradise.net.nz
Tue Jun 22 10:50:59 NZST 2004


Quoting Jamie Dobbs <jamie.dobbs at orcon.net.nz>:

> It almost seems to work.
> Specifically what I am trying to do:
> 
> perl -ne 'print if
> /Yes/&&/a.person at domain.co.nz|another.person at domain.co.nz|yet.anothe
> r at domain.co.nz/'
> < / file | wc -l

> any of the email addresses listed (this is because some people have
> multiple email addresses and I need to parse the log to find details to
> all addresses that the person might have.).
The phrase you're using is an OR ... when the first one hits
the next ones won't be touched ... I guess you'll have to save
the lines that have that yes, and then loop over the result
for all addresses you want to match.





More information about the wellylug mailing list