Linux.com

Correction

Posted by: Anonymous Coward on January 17, 2006 12:35 PM
Your code didn't work on my machine.

This code did..<nobr> <wbr></nobr>/sbin/ifconfig | awk -F'[<nobr> <wbr></nobr>:]+' '$1 {iface=$1}<nobr> <wbr></nobr>/inet/ {print iface, "=", $4;iface=""}'

(The second test `iface' changed to `/inet/' )

#

Return to CLI Magic: Learn to talk awk