Thread: grep 2 at signs
View Single Post

   
  #2 (permalink)  
Old 02-15-2008, 07:06 PM
Bob Stockler
 
Posts: n/a
Default Re: grep 2 at signs

Jeff Hyman wrote (on Mon, Jul 10, 2006 at 04:46:54PM -0400):

| bob@vodka.com
| jpr@jane.com
| jeff@needshelp.net
| joey@test.net
| jeff@waylon@bank.com
| ^------^------------ 2 @ signs
|
| I want to locate any email with 2 "at" signs inside file "file_list".
| Keep in mind there is only ONE email per line and there are
| 10's of thousands of email addresses in "file_list".
|
| # grep "*@*@" file_list Displays every line
| # grep "*\@*\@" file_list Displays every line

How about:

egrep '.*@.*@' file_list
or
awk '/.*@.*@/ { print }'file_list

Bob (who would use mawk 'cause it'd be fastest)

--
Bob Stockler +-+ bob@trebor.iglou.com +-+ http://members.iglou.com/trebor
Reply With Quote