Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google site




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 07-28-2005
rmjoe rmjoe is offline
Registered User
 

Join Date: Jul 2005
Posts: 2
command line argument parsing

how to parse the command line argument to look for '@' sign and the following with '.'.
In my shell script one of the argument passed is email address. I want to parse this email address to look for correct format.

rmjoe123@hotmail.com has '@' sign and followed by a '.'


to be more specific :

>abc.sh rmjoe123@hotmail.com

abc.sh should parse this email address and look for '@' and '.'. If email address is valid, abc.sh should continue doing what it is doing. Otherwise abort with error message.

Response is appreciated.

Last edited by rmjoe; 07-28-2005 at 04:10 PM..
Sponsored Links