Learn about Linux
Download Linux
Get Linux help
Get special offers on:
Linux Application Dev Programming Software
Email:
#
Return to CLI Magic: Learn to talk awk
© Copyright 1999-2008 - SourceForge, Inc., All Rights Reserved About Linux.com - Privacy Statement - Terms of Use - Advertise - Trademark - Ask Linux Questions - Write for Us - RSS Feed ThinkGeek - Slashdot - SourceForge.net - freshmeat - Surveys - Jobs
Correction to Correction
Posted by: Anonymous Coward on February 01, 2006 02:03 AMBut anyway if you are going to trigger off<nobr> <wbr></nobr>/inet/ you don't need to clear the temp variable (iface=""), so do this:
ifconfig|awk -F'[<nobr> <wbr></nobr>:]+' '$1 {iface=$1};/inet/ {printf "%s:\t%s\n",iface,$4}'
see?
#