This works in Linux, must work on other *nix versios too !

ping -c1 `hostname` | grep from | tail -n 1 | cut -f4 -d" " | cut -f1

-d":"


-- 
  |\/\/\/| Prasanna P Subash
  |      |
  |      | TurboLinux, Inc           Home
  | (o)(o) ">psubash@turbolinux.com    ">prasanna@mindspring.com
 C      _) 2000 Sierra Point Pkwy    1201 Monte Diablo Ave
  | ,___|  Brisbane CA 94005         San Mateo CA 94005
  |   /    650 228 5213              650 558 9077
 /____\
/      \   "Every action has an equal and opposite criticism"
">Stan.Hearn@ipst.edu wrote:
>  
> I want to write a script which will run on Linux, Solaris 2.x, and IRIX 6.x
> which needs to determine it's own IP address or it's subnet of the machine
> that it's running on.

> I thought of using nslookup or ifconfig and culling out the information.

> Anyone know of a better (or should I say standard) solution?

> Thanks,
> Stan

> --
> To unsubscribe: mail ">majordomo@ale.org with "unsubscribe ale" in message body.
--
To unsubscribe: mail ">majordomo@ale.org with "unsubscribe ale" in message body.