[ale] scripting challenge du'jour

Jim Popovitch jimpop at yahoo.com
Thu Jul 6 15:47:11 EDT 2006


Joe Steele wrote:
> Would it not be more efficient to use sed only once and avoid the grep 
> and awk?
> 
> ifconfig | sed -n "/inet /s/\
> .*:\([^ ]*\)\
> .*:\([^ ]*\)\
> .*:\([^ ]*\)\
> /\1\/\3\t\2/p"

Nice, very nice.  Thanks for the additional tip.

-Jim P.




More information about the Ale mailing list