Get fully qualified domain names (FQDNs) for IP address with failure and multiple detection

NAME=$(nslookup $IP | sed -n 's/.*arpa.*name = \(.*\)/\1/p'); test -z "$NAME" && NAME="NO_NAME"; echo "$NAME"

2
By: morlockhq
2009-02-05 15:21:22

What Others Think

Can you tell me a bit more, please? guitar lessons
aegyjingoo · 42 weeks ago
When a blind man bears the standard pity those who follow…. Where ignorance is bliss ‘tis folly to be wise…. N95 Face Mask
KayGasaway · 13 weeks and 2 days ago
I have seen some great stuff here. Worth bookmarking for revisiting. I surprise how much effort you put to create such a great informative website. Your work is truly appreciated around the clock and the globe. ?????
KayGasaway · 13 weeks ago
Great job for publishing such a beneficial web site. Your web log isn’t only useful but it is additionally really creative too. There tend to be not many people who can certainly write not so simple posts that artistically. Continue the nice writing ??????????
KayGasaway · 12 weeks and 2 days ago
it was a wonderful chance to visit this kind of site and I am happy to know. thank you so much for giving us a chance to have this opportunity.. ????????? ?????xo
KayGasaway · 12 weeks and 2 days ago
Hey what a brilliant post I have come across and believe me I have been searching out for this similar kind of post for past a week and hardly came across this. Thank you very much and will look for more postings from you. http://www.onerepmaxonline.com/">best protein powder for weight loss
KayGasaway · 12 weeks and 1 day ago
A lot of people having an incorrect image about the cash advance loans or sometimes refer it as bad credit payday loans. ???????????????????????????????
jackson2321 · 12 weeks and 1 day ago
Just pure classic stuff from you here. I have never seen such a brilliantly written article in a long time. I am thankful to you that you produced this! ?????????????? sa
jackson2321 · 12 weeks ago
I know your aptitude on this. I should say we ought to have an online discourse on this. Composing just remarks will close the talk straight away! What's more, will confine the advantages from this data.  ??????? pantip
jackson2321 · 10 weeks and 6 days ago
This is such a great resource that you are providing and you give it away for free. ?????
jackson2321 · 4 weeks and 1 day ago
I am very happy to discover your post as it will become on top in my collection of favorite blogs to visit. monthly bookkeeping packages
jackson2321 · 4 weeks ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: