jetsung Shell 提取脚本传过来的参数 for ARG in "$@"; do case "$ARG" in -p | --platform) shift if [ $# -ge 1 ] && [[ "${1}" != -* ]]; then PLATFORM="${1}" fi ;; -v | --version) shift if [ $# -ge 1 ] && [[ "${1}" != -* ]]; then VERSION="${1}" fi ;; *) shift ;; esac done