OT: converting to IP address

Página superior
Adjuntos:
Obtener este mensaje como un correo
+ (text/plain)
Eliminar este mensaje
Responder a este mensaje
Autor: Kevin Buettner
Fecha:  
Asunto: OT: converting to IP address
On Mar 8, 10:18pm, Cliff Rogers wrote:

> I know this is not a *nix question but I think I saw this on the
> list sometime ago. Is there a way to convert "members.cox.net" to
> an IP address like XXX.XXX.XXX.XXX?


perl -e 'print join(".", unpack('C4', (gethostbyname("members.cox.net"))[4])), "\n"'

(However, it's probably easier to use either dig or nslookup.)

Kevin