Question: What is wrong with this code? # ! / bin / bash echo = = = = = = = = = = =
What is wrong with this code? #binbash
echo
echo "Developer: Lino J Leos"
echo
# Available tools
toolHammer "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
freetool$tool@$choice
toolHammer
"pliers"
"Saw"
"Screwdriver"
"Mallet" $freetool"
# Select a free tool
echo e$tool
echo As part of our special offer, you get a free $freetool with your purchase!"
read p "Enter the free tool picked enter $tool: choice
if $tool~ $choice; then
echo "You have chosen: $choice
else
echo "Error: Please enter a valid tool name from the list"
fi
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
