posted 7 years ago
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 002.222.111.000 appear 000.111.222.002 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 (- )
example
i did this but i dont know what to use next with this
:vi iphost.sh
echo -n 002.222.111.000
escape +wq!
sh iphost.sh