[Cialug] saving a step in rdns lookups

Zachary Kotlarek zach at kotlarek.com
Wed Oct 8 11:25:08 CDT 2008


On Oct 8, 2008, at 10:46 AM, Tom Pohl wrote:

> You could always make a bash script that replaces the www.google.com  
> with $1 and basically do this:
>
> host www.google.com |grep address|awk '{print $4}'|xargs -n 1 host

Or remembering that awk is happy to match things you can skip grep and  
avoid weirdness when the hostname contains the substring "address" and  
is a CNAME or has an MX with:

host www.google.com | awk '$3 == "address" {print $4}'  | xargs -n 1  
host

	Zach

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2746 bytes
Desc: not available
Url : http://cialug.org/pipermail/cialug/attachments/20081008/1114dbaf/smime-0001.bin


More information about the Cialug mailing list