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
Get step-by-step solutions from verified subject matter experts
