Skip to content
Advertisement

Print a certain line in linux or options for nslookup

I’m very new to linux and bash. I’m trying to find a domain name for an ip address. When I use nslookup I have a bunch of lines like this

JavaScript

Output

JavaScript

I only want to print www.computerhope.com in the second line. How do I do this? Also I tried to use host command as well. It looks cleaner.

JavaScript

How do I only print www.cyberciti.biz when I use host command ? PLease help

Advertisement

Answer

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement