This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
SNAME=$(uname -s) | |
# Assume a default interface. eth0 isn't so predictable on linux anymore, TODO a better one there. | |
case $SNAME in | |
"Darwin") IFACE=${1-en0};; | |
"Linux") IFACE=${1-eth0};; | |
*) echo Sorry, I was too lazy to add your OS; exit 1;; | |
esac |