将参数传递给Bash脚本时,如:
1 while getopts u:d:p:f: option
2 do
3 case "${option}" in
4 u) USER=${OPTARG};;
5 d) DATE=${OPTARG};;
6 p) PRODUCT=${OPTARG};;
7 f) FORMAT=$OPTARG;;
8 esac
9 done
来自:http://linux.about.com/od/Bash_Scripting_Solutions/a/How-To-Pass-Arguments-To-A-Bash-Script.htm
{4-}行4-5-6和${OPTARG};;
第7行有什么区别?