# origin result bash bash_arguments_example.sh -v "a b" "ff 11" input argument[0]: a b input argument[1]: ff 11 # with debuging option $ bash -x bash_arguments_example.sh -v "a b" "ff 11" + verbose=0 + '[' 1 ']' + [[ -v =~ -.* ]] + '[' -v == -v ']' + verbose=1 + shift + '[' 1 ']' + [[ a b =~ -.* ]] + break + '[' -z 'a b' ']' + arguments=("$1" "$2" "$3") + argc=3 + '[' 3 -eq 0 ']' + (( i=0 )) + (( i<3 )) + '[' 'xa b' = x ']' + clog 'input argument[0]: a b' + '[' 1 -gt 0 ']' + echo input 'argument[0]:' a b input argument[0]: a b + (( i++ )) + (( i<3 )) + '[' 'xff 11' = x ']' + clog 'input argument[1]: ff 11' + '[' 1 -gt 0 ']' + echo input 'argument[1]:' ff 11 input argument[1]: ff 11 + (( i++ )) + (( i<3 )) + '[' x = x ']' + continue + (( i++ )) + (( i<3 )) + exit 0