Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started