On Wed, 24 Oct 2001, Michael O'Donnell wrote:
> I can run ifconfig to learn what IP addr a given Enet
> interface currently has assigned to it but I wonder if
> there is some more direct means of obtaining such info
> that is simpler to use from a script, maybe something like
>
>    eth2ip_addr=`cat /proc/sys/net/ipv4/conf/eth2/ip_addr`

ifconfig $IFACE | perl -ne 'print "$1\n" if m/inet addr:([0-9.]*)/;'

  (or something like it) is what I usually use.

-- 
Ben Scott <[EMAIL PROTECTED]>
| The opinions expressed in this message are those of the author and do not |
| necessarily represent the views or policy of any other person, entity or  |
| organization.  All information is provided without warranty of any kind.  |


**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to