Create a gist now

Instantly share code, notes, and snippets.

This script uses native whois command to return the WHOIS information of the IP Addresses provided.
#!/usr/bin/sh
#
# downloadWHOIS.sh
#
# This script uses native whois command to return the WHOIS information
# of the IP Addresses provided.
#
# USAGE:
# $ ./downloadWHOIS.sh 1.2.3.4
# $ ./downloadWHOIS.sh 1.2.3.4 1.2.3.5 1.2.3.6 etc.
#
# Set path to save files:
path=/Downloads/
# Set filename prefix and/or suffix:
prefix=
suffix=\_whois.txt
for args in "$@"
do
whois $args > $path$prefix$args$suffix
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment