Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Challenge 1 Use to create a script called music.sh . Include the Bash shebang line at the top: # ! / bin / bash Write
Challenge
Use to create a script called
music.sh
Include the Bash shebang line at the top: #binbash
Write a command that presents the user with the prompt Enter major or minor:
Use the read command to save the user's response in a variable called
scaleType.
Write an if statement to test the user's response in the scaleType variable.
If the scaleType is major
Then display the response Major scales sound bright and hopeful
Else, if the variable is
Display the response Minor scales sound sad and mysterious
If the user enters anything else
Display
Write a command that presents the user with the prompt What is your favorite
genre of music?
Use the read command to save the user's response in a variable called genre
Write a case statement to display the following results:
If the user enters pop, display the message You might enjoy Ariana Grande
If the user enters classical, display the message You might enjoy Vivaldi
If the user enters hip hop, display the message You might enjoy Drake
If the user enters dance, display the message You might enjoy UMEK
If the user enters country, display the message You might enjoy Jason
Aldean
If the user enters any other value, display the message Great choice!
Use the Try It button to test your script in the
terminal.
When your script works as described above submit your
script below.
Click the button below to submit.
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