• Post Reply Bookmark Topic Watch Topic
  • New Topic

How to use command host  RSS feed

ekte spiriopoulos
Ranch Hand
Posts: 217
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I should create a script name iphost.sh .This script will take as appointed one address ip and when i call the command host will appear the hostname which corresponds to an IP.Lets say IP is host appear in-addr.arpa domain name pointer name.server.com (name.server.com i put it because i dont want to give the original server).From all this i should keep only the bold name that finds in the end (name.server.com ) .When i give command host 111.333.444.444 doesnt exist Host 111.333.444.444 .in-addr.arpa not found: 3(NXDOMAIN).Script should know if "not found" in this case will print one (- )

i did this but i dont know what to use next with this
:vi iphost.sh
echo -n
escape +wq!
sh iphost.sh
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!