2012年8月20日 - Use the getopts -builtin here's a tutorial pages= length= time= while getopts p:l:t: opt; do case $opt in p) pages=$OPTARG ;; l) length=$OPTARG ;; t) ...
stackoverflow.com