[Solved] zsh/bash string to array not working using parentheses
cat “73276948.sh” #!/bin/bash STR=”one two three” array=($STR) echo “${array[@]}” # prints: one two three echo “len: ${#array[@]}” # prints: len: 1 echo “1ST: ${array[0]}” # prints: one two three echo “2ND: ${array[1]}” # prints: one two three echo “3RD: ${array[2]}” # prints: one two three echo “Using loop:” for (( indx = 0; indx < … Read more