Bash Scripting - Arrays
Find the error in this script that tries to add "blue" to array
colors:colors=("red" "green")
colors=colors+"blue"
echo "${colors[@]}"colors:colors=("red" "green")
colors=colors+"blue"
echo "${colors[@]}"colors+=("blue").colors=colors+"blue" treats it as string concatenation, not array append.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions