Bash Scripting - Arrays
Identify the issue in the following Bash script snippet:
arr=(red blue green yellow)
echo ${arr:2:2}arr=(red blue green yellow)
echo ${arr:2:2}${arr[@]:start:length}. Using ${arr:start:length} is incorrect.${arr:2:2} which is invalid for arrays; it is used for string slicing.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions