find nslookup for multiple servers via script

Steps to find nslookup for multiple servers 

1. store the server name in a file  named file1.txt  which located in /tmp/file1.txt

#cat file1.txt
Server01
Server02
Server03
Server04
Server05
Server06
Server07

2. run for loop to find the nslookup , Please run the commands as it is .

OracleServer01:# for i in `cat /tmp/file1.txt`;
do
nslookup $i
done

Leave a Reply

Your email address will not be published. Required fields are marked *