How to use getopt with this several values?
问题 I try to achieve a script with multi options. I started with the doc, get some errors, went to the browser. Read some links and find this on SO : Using getopts in bash shell script to get long and short command line options. So I read it and rewrote my script. I made a mistake somewhere. Where am I wrong ? SH #!/bin/sh TEMP=`getopt -o vfts: --long verbose,format,type,style: \ -n 'opt2' -- "$@"` if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi eval set -- "$TEMP" VERBOSE=false