Unix Sh Script

The script will accept 3 grades, calculate an average and display a letter grade based upon the average. You will need to use either the “if” statement and/or the “case” statement to implement this script. each pseudo step will be addressed by executing your script/program.
1. Create a shell script in your home directory.
2. Convert the pseudocode below into a script.
3. Save the script.
4. Execute the script and input the 3 grades when prompted.
5. Provide script and captured output for assignment.
Pseudocode
• Read in 3 grades from the keyboard
• Average the grades
• Display the appropriate letter grade for the number grade using this scale:
o 90 to 100: Display a grade of “A”
o 80 to 89: Display a grade of “B”
o 70 to 79: Display a grade of “C”
o 65 to 69: Display a grade of “D”
o 0 to 64: Display a grade of “F”

Leave a Reply

Your email address will not be published. Required fields are marked *