#!/bin/bash echo "This is an automated script to execute the whois and dig commands." answer=0 echo -n "Do you know the IP address? " read answer if [ answer = 0 ] then echo -n "Enter the hostname: " read hostname dig $hostname else echo -n "Please enter the IP address: " read ip echo -n "Now we'll do some whois searching to find out who it is, please wait while I do this..." whois $ip