Bash's builtin getopts doesn't support --long-name args . Linux has a getopt command, but OS X's is limited. Perhaps I'll just use Python.