Bash Scripting - Arrays
What is the output of this Bash script?
tools=("hammer" "wrench" "screwdriver")
tools+=("pliers")
unset tools[1]
echo "${tools[@]}"tools=("hammer" "wrench" "screwdriver")
tools+=("pliers")
unset tools[1]
echo "${tools[@]}"tools+=("pliers"), array is [hammer, wrench, screwdriver, pliers].unset tools[1] removes "wrench", leaving indices 0,2,3.${tools[@]} outputs existing elements in order: hammer screwdriver pliers.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions