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 [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]