Created
January 9, 2019 04:22
-
-
Save sgraham785/d0484c3cf5df1e662c8db935bc8609f3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# USAGE: sh whois.sh /path/to/file.txt | |
# RESULT: domain.com ORG_NAME | |
for domain in `cat $1` | |
do | |
# str_domain=${domain#www.} # strip a leading www. | |
reg=`whois $domain | grep -i -A 1 "Registrant Name:" | tail -n 1` | |
str_reg=${reg#Registrant Organization:} # strip line title | |
echo "$domain \t $str_reg" | |
# sleep 1 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment