#!/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