Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Bash version' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Bash version
Authored by: klktrk on Mar 20, '06 12:05:27PM
#! /bin/bash
# 2006 Beerguy's Reef - www.hopdog.com
#

for if in `ifconfig -a | grep ^en | awk '-F:' '{print $1}'`;do

/sbin/ifconfig $if > /tmp/if-stat

addr=`cat /tmp/if-stat | grep 'inet ' | awk '-F ' '{print $2}'`
speed=`cat /tmp/if-stat | grep media | awk '-F: ' '{print $2" "$3}'| head -1`

echo "$if: $addr $speed"
rm /tmp/if-stat
done 
exit 0

btw, This post addresses Tiger issues: http://www.macosxhints.com/article.php?story=20050929073742291



[ Reply to This | # ]