#!/bin/bash [[ -n "$*" ]] && { for((i=1;i<="$#;"i++)) do echo "${!i}" done } || { echo 'Empty argument !' }
#bash test.sh 1 2 3 "4 5" 6 "7 8" 1 2 3 4 5 6 7 8
#!/bin/bash [[ -n "$*" ]] && { for((i=1;i<="$#;"i++)) do echo "${!i}" done } || { echo 'Empty argument !' }
#bash test.sh 1 2 3 "4 5" 6 "7 8" 1 2 3 4 5 6 7 8
转载于:https://www.cnblogs.com/orzs/p/11593591.html