I have an input file with IP addresses like:
106.1.2.5
42.34.74.34
173.23.74.34
And so on
I am decoding all the IP addresses from a shell script the code of which is as follows:
while read line
do
#nslookup $line
echo " "
echo "# IP Analysis Details For IP $line #"
echo " "
whois $line | grep OrgName || whois $line | grep descr
echo " "
echo "Hostname Details....."
echo " "
dig -x $line | grep PTR | dig -x $line | grep in-addr.arpa
#dig -x $line | grep PTR | dig -x $line | grep in-addr.arpa
#whois $line | grep $line && whois $line
echo " "
echo "*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*# *#*#*#*#*#*#*#*#*#*#*#*#"
done < websitedump.txt
It shows the details but I want the output to come in a table form where I can copy paste the result in an excel sheet also. What my desired output should be (an example):
106.1.2.5 | China Telecom | China | And so on
42.34.74.34 | Vodafone | UK | And so on
I should be able to copy paste the output and paste in an excel sheet which automatically comes in table.