> Hi, does anybody know how to get a host IP address given the host name
> in a script?

X=`host "$HOSTNAME" | grep "$HOSTNAME has address"|cut -f4 -d ' '|tr '\n' ' '`

Should do the job nicely and leave $X holding a list of IP addresses


-
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to [EMAIL PROTECTED]

Reply via email to