[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] finding ip address of host
- Subject: [ale] finding ip address of host
- From: greg at turnstep.com (greg at turnstep.com)
- Date: Tue, 18 Sep 2001 09:10:16 -0400 (EDT)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> I need to find out the ip address of the host. I have a series
> of commands that will do it. Anyone have a better way?
>
> ifconfig eth0 |grep -i inet | cut -f2 -d":" |cut -f1 -d" "
This should work just fine. Is there any reason not to use the above?
My only small suggestions would be to specify the full path to
ifconfig (just in case) and to remove the superflous "-i" because
ifconfig always returns inet lowercase anyway.
Greg Sabino Mullane
greg at turnstep.com
PGP Key: 0x14964AC8 200109180907
-----BEGIN PGP SIGNATURE-----
Comment: http://www.turnstep.com/pgp.html
iQA/AwUBO6dHsrybkGcUlkrIEQJonACgg93fAm4DGCqcnc+peVcTWKoKAJcAoJT8
bqeXBLICCkJpVf2mF5SK5xNU
=puRu
-----END PGP SIGNATURE-----
--
To unsubscribe: mail majordomo at ale.org with "unsubscribe ale" in message body.