snippet getopts "Deal with shell parameters" b BOOL=false VAVLUE='' while getopts ":bv:" o; do case "${o}" in b) BOOL=true ;; v) VALUE=${OPTARG} ;; *) echo "Usage: $1 [-b] [-v VALUE]" return ;; esac done endsnippet