shell参数中空格

在使用shell传参数时。

解析参数时请不要用shift

 action="$1"

case "$action" in
    status)
        shift
        status$@
        exit $?
    ;;
    ...
     *)
        help
        exit -1
    ;;
esac

因为就算有双引号,也无法再次传递。

而是应该确定的按参数追逐个传递。

    status)
        status  $2 $3
        exit $?
    ;;