2014-06-26から1日間の記事一覧

getopts でロングオプションを取る

getoptsではロングオプションは使えないということになっているが・・・ while getopts "\-:" opt do case $opt in -) # long options case $OPTARG in help) print_help;; *) echo "unknown option: $OPTARG"; exit 1;; esac;; ?) if [[ $opt = "?" ]]; the…