I have this code that parses the output of a reverse dns lookup to a domain name
nslookup $IP | sed -n 's/.*arpa.*name = \(.*\)/\1/p'
But my ouput is always
Notice the period tacked on to the end. How do I correct this so it is just
Thank you.
I have this code that parses the output of a reverse dns lookup to a domain name
nslookup $IP | sed -n 's/.*arpa.*name = \(.*\)/\1/p'
But my ouput is always
Notice the period tacked on to the end. How do I correct this so it is just
Thank you.
nslookup $IP | sed -n 's/.*arpa.*name = \(.*\).$/\1/p'