Question: What is wrong with this code? # ! / bin / bash echo = = = = = = = = = = =

What is wrong with this code? #!/bin/bash
echo "========================="
echo "Developer: Lino J Leos"
echo "========================="
# Available tools
tool=("Hammer" "pliers" "Saw" "Screwdriver" "Mallet")
echo "See what you can get free if you buy one"
# Prompt user for choice
read -p "Enter the tool bought [enter Hammer, Pliers, Saw, Screwdriver, Mallet]: " choice
if [[" ${tool[*]}"=~ " ${choice}"]]; then
Echo "You have bought a: $choice"
# Remove the chosen tool from list
free_tool=("${tool[@]/$choice}")
tool2=("Hammer"
"pliers"
"Saw"
"Screwdriver"
"Mallet" -"$free_tool")
# Select a free tool
echo -e"$tool2"
echo "As part of our special offer, you get a free $free_tool with your purchase!"
read -p "Enter the free tool picked [enter $tool]: " choice2
if [[" ${tool2[*]}"=~ "${choice2}"]]; then
echo "You have chosen: " $choice2"
else
echo "Error: Please enter a valid tool name from the list"
fi
 What is wrong with this code? #!/bin/bash echo "=========================" echo "Developer:

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!