I'm trying to have a file whithin two fields:
Ip address| dns domain
I have a script that will pipe a parm to awk:
while read line
do
/usr/sbin/nslookup $line | awk '$1=="Name:" {print $2}'
done<ip.int
where ip.int is a file containing the ip address. How can I obtain a file whith $line;$2 passing $line to the awk sentence?
Ip address| dns domain
I have a script that will pipe a parm to awk:
while read line
do
/usr/sbin/nslookup $line | awk '$1=="Name:" {print $2}'
done<ip.int
where ip.int is a file containing the ip address. How can I obtain a file whith $line;$2 passing $line to the awk sentence?