Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env bash
# Time-stamp: <2017-04-27 09:57:21 kmodi>
#
# Example of using getopt to parse command line options
# http://stackoverflow.com/a/29754866/1219634 Limitation: All the options
# starting with - have to be listed in --options/--longoptions, else getopt will
# error out. So this cannot be used in wrapper scripts for other applications
# where you plan to pass on the non-wrapper-script options to that wrapped
# application.