Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 14 Sep 2017 20:58:35 -0500
From:      Tim Daneliuk <>
To:        FreeBSD Mailing List <>
Subject:   Re: Help scripting dns lookup using awk
Message-ID:  <>
In-Reply-To: <>
References:  <>

Next in thread | Previous in thread | Raw E-Mail | Index | Archive | Help
On 09/14/2017 07:55 PM, Ernie Luzar wrote:
> The following sh script works, but runs very slow.
Rudiments of the same thing in Python (spacing and indents matter):

#!/usr/bin/env python
# Return IP Of Hostnames Specified On Commandline

from socket import gethostbyname
from sys    import argv

for host in argv[1:]:
        print gethostbyname(host), " " * 8, host

        print "Invalid Hostname: %s" % host

Tim Daneliuk
PGP Key:

Want to link to this message? Use this URL: <>