The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 08-22-2007
ahmedwaseem2000 ahmedwaseem2000 is offline
Registered User
 

Join Date: Aug 2005
Location: Bangalore
Posts: 206
try this:

for emailid in $(cat filename) ; do
echo $emailid | awk -FS="@" '{
if ( $1 == "" || $2 == "" || $2 !~ /\./ )
print "Invalid Id"
else
print "Valid Email Id"

}
Reply With Quote