Skip to content

Instantly share code, notes, and snippets.

View shaunoneil's full-sized avatar

Shaun ONeil shaunoneil

View GitHub Profile
#!/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