[TriLUG] host IP address

Alan Porter porter at trilug.org
Thu Mar 17 19:57:20 EDT 2011


I just want to get a machine's IP address.
Surely there's an easier way to do this.

$ host dmzview
dmzview.ssz.tekelec.com has address 10.241.4.16

$ echo $(host dmzview | sed 's/^.* //g')
10.241.4.16

Isn't there some short version of "host" or "dig"
or "nslookup" or something that just gives me the
IP without the other stuff?

Alan




.




More information about the TriLUG mailing list