[NTLUG:Discuss] Script for domain validation
    Steve Southwell 
    ses at sagepost.com
       
    Thu Apr 15 15:13:06 CDT 2004
    
    
  
I've just about got a script working, and what I want it to do is simply 
validate that a given domain exists. (It's part of an email address 
validation routine)
I'm just about brain dead this afternoon - can anyone tell my why this 
doesn't work, and perhaps suggest a fix:
host $1 | grep " has address " &> /dev/null || echo "Bad"; exit 1
echo "Good"; exit 0
what happens is that it correctly handles the "Bad" case, but doesn't 
handle the good case.
-- 
Steve Southwell                     214-488-2239 (Voice)
President / CEO                     214-280-6439 (Mobile)
SagePost, Inc.                   http://www.sagepost.com
Internet Data Services Provider
    
    
More information about the Discuss
mailing list