On Mon, 14 Nov 2011 16:44:48 +0000, T o n g wrote:

> I know how to get an IP address *info* using dig, but has anyone looked
> into how to get *only* the IP address? so that I can use, eg.
> 
>  the_ip=`get_ip host`

Not sure if this will be bulletproof but...

sm01@stt008:~$ host -t a google.com|head -n1|awk '{ print $4 }'
209.85.169.105

Greetings,

-- 
Camaleón


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/pan.2011.11.14.16.59...@gmail.com

Reply via email to