Checking for the existence of domains from commandline in Bash


while read line; do wget --quiet --spider --timeout=10 $line; if [ $? -ne 0 ]; then echo $line; fi; done < "/tmp/domains.txt" 

/tmp/domains.txt would hold the list of domain names separated by newline.
Note this is just a quick hack and not entirely reliable.
, ,

Leave a Reply

Your email address will not be published. Required fields are marked *