Question
Task 06 (5 points) Write a Bash script that will use a function to calculate the area of a rectangle. Example input Example output Enter
Task 06 (5 points)
Write a Bash script that will use a function to calculate the area of a rectangle.
Example input | Example output |
Enter the length: 12 Enter the width: 5 | The area of the rectangle is 60 |
Task 07 (5 points)
Write a Bash script that will use a for loop to print the following string exactly 47,914 times:
Example input | Example output |
./myScript.sh | I will not use scripting to automate my punishments. I will not use scripting to automate my punishments. 47,911 entries later I will not use scripting to automate my punishments. |
Task 08 (5 points)
Write a bash script using a while loop that will ask for an input until it gets the secret word
Example input | Example output |
Instruction Classroom teacher Banana | Enter another word: Enter another word: Enter another word: Thats the secret word! |
Task 09 (5 points)
Write a bash script using a if statement that will take a positional argument as input and return the following output:
Example input | Example output |
data processor install banana | omelette stir fry baked potato burrito |
Task 10 (5 points)
Write a bash script using a if statement and a while loop that will continually prompt and return the first word that comes to its mind for the following prompts:
Example input | Example output |
technology memory error banana | pizza cookie steak hungry |
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