I'm trying to use an array with while read, but the entire array is output at once.
#!/bin/bash
declare -a arr=('1:one' '2:two' '3:three');
while read -e it ; do
echo $it
done <<< ${arr[@]}
It should output each value separately (but doesn't), so maybe while read isn't the hot ticket here?
cat <<< ${arr[@]}puts all elements on the same line.<and<<also, but didn't really get it.