home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!howland.reston.ans.net!spool.mu.edu!agate!doc.ic.ac.uk!warwick!uknet!bhamcs!dmp
- From: dmp@cs.bham.ac.uk (Donald Peterson)
- Newsgroups: comp.unix.questions
- Subject: sed and email addresses
- Message-ID: <C15nzq.BqK@cs.bham.ac.uk>
- Date: 20 Jan 93 13:55:01 GMT
- Sender: news@cs.bham.ac.uk
- Organization: Cognitive Science, Birmingham, UK
- Lines: 23
- Nntp-Posting-Host: fattie
-
-
- I need to use a stream editor (eg sed or awk) to extract email
- addresses from accumulated email. Using fgrep I get lines like
-
- From: person's name <person@address>
-
- and
-
- From: person@address (person's name)
-
- etc.
-
- Can anyone tell me what is the sed or awk command for "pick out the
- string with SPACE, < or ( at the left, @ in the middle, and SPACE, >
- or ) in the right, no SPACEs in between?
-
- Please email me direct:
-
- Thanks,
-
- Donald Peterson.
-
- email: D.M.Peterson@cs.bham.ac.uk
-