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


Click here to return to the 'iTunes, the menu bar, unicode, and GeekTool' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
iTunes, the menu bar, unicode, and GeekTool
Authored by: uff on Jul 06, '04 07:22:01PM
Not to one-up you, but this is slightly better. Make ipscript.sh and then set geek tools to run the script from wherever you decide to store it:

#!/bin/sh

/sbin/ifconfig en0 | grep "inet " > /dev/null
if [ $? -eq 0 ]; then
        ifconfig en0 | grep "inet " | awk '{print "LAN: ", $2}'
else
        echo "LAN: disconnected";
fi

/sbin/ifconfig en1 | grep "inet " > /dev/null
if [ $? -eq 0 ]; then
        ifconfig en1 | grep "inet " | awk '{print "WLAN: ", $2}'
else
        echo "WLAN: disconnected";
fi


[ Reply to This | # ]