if [ $1 -eq 1 ];then echo "you input is $1."elif [ $1 -eq 2 ];thenecho "you input is $1."elseecho "you input is wrong."exit 2 fi
linux arguments variables usage
原文:http://blog.51cto.com/546136/2060111