#! /bin/csh # 2006 Beerguy's Reef - www.hopdog.com # foreach if(`/sbin/ifconfig -a | grep ^en | awk '-F:' '{print $1}'`) /sbin/ifconfig $if > /tmp/if-stat set addr = `cat /tmp/if-stat | grep 'inet ' | awk '-F ' '{print $2}'` set speed = `cat /tmp/if-stat | grep media | awk '-F: ' '{print $2" "$3}'| head -1` echo $if": "$addr $speed rm /tmp/if-stat end