Martin Schultz
Martin Schultz

Reputation: 2861

Grep newsletter bounce mails for emails

I've sent out a newsletter and am watching now the inbox of the bounced mails. I'd love to grep all mails in the mail user directory on the mail server for the email addresses. What I fail to find out is how I can grep for anything between "<" and ">" as most of the bounce mails have a line like this:

<[email protected]>: host gmail-smtp-in.l.google.com[74.125.136.27] 

Any help on learning grep by this example greatly appreciated.

Thanks!

Upvotes: 0

Views: 100

Answers (1)

perreal
perreal

Reputation: 98088

This can be of help:

grep '<[^>]*@[^>]*>' input

Upvotes: 1

Related Questions