Need help from the sed gods

Richard Lightman richard at nezumi.plus.com
Sun Sep 22 06:09:45 PDT 2002


* Oliver Brakmann <obrakmann at gmx.net> [2002-09-22 13:35]:
> 
> I want to extract the IP address of a running network interface
> from the output of 'ifconfig $interface'.
> Can anybody tell me which sed expression I have to use to get
> the IP address?
> 
ifconfig ppp0 | awk '/inet addr:/ {print substr($2,6)}'

Richard
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-chat' in the subject header of the message



More information about the lfs-chat mailing list