#!/bin/bash for url in `cat url_file.txt` do #returns in the form of google.com PREFIX=#split $url SUFFIX=#split $url wget -qO - http://www.whois.net/whois_new.cgi?d=$PREFIX&tld=$SUFFIX done