Normally you can only have single-character options when processing your arguments with a standard getopts utility in Linux or Mac OS X. You can use getopt for long options, but it is not included in the standard Mac OS X installation. So this is a trick that will allow you to simulate long options with a standard getopts, that will work on all *nix platforms without additional software installations. This function will also print a usage tip if you execute the script without parameters (or with -h parameter).
test automation, scripting, system administration, etc.