if [[ $# -eq 0 ]] ; then echo 'some message' exit 0 fi case "$1" in 1) echo 'you gave 1' ;; *) echo 'you gave something else' ;; esac
Advanced Bash-Scripting Guide是相当不错。尽管它的名字,它确实治疗的基础。
if [[ $# -eq 0 ]] ; then echo 'some message' exit 0 fi case "$1" in 1) echo 'you gave 1' ;; *) echo 'you gave something else' ;; esac
Advanced Bash-Scripting Guide是相当不错。尽管它的名字,它确实治疗的基础。