Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

I need with this linux shell program please :) Procedure Write the following scr

ID: 3680059 • Letter: I

Question

I need with this linux shell program please :)

Procedure

Write the following script using your Linux virtual machine. You must use vim as the editor.

The first line of your script file should force the use of the bash shell as the command interpreter. Your script file should be properly commented, including your lab section number, your name, and your student ID etc. Note that marks will be deducted for scripts without proper comments.

In this lab, you will create a script called mygrade that will calculate and then display letter grade of CST8102. Use only integers for grade calculations.

1.   Get user inputs of the following grades:

Assignments 40%

Test1 15%

Test2 15%

Final exam 30%

     

Note: To avoid decimal places in calculations, you may prompt the user to input an integer percentage number for each of the items listed above. You don't have to handle invalid input.

     

2.   Calculate the number grade by adding up the four grades input by user

3.   Convert the number grade to letter grade using the table below:

      (Hint: use “Multilevel if-then-else” or case statement)

        Number Grade   Letter Grade

90 - 100                      A+

85 - 89                        A

80 - 84                        A-

77 - 79                        B+

73 - 76                        B

70 - 72                        B-

67 - 69                        C+

63 - 66                        C

60 - 62                        C-

57 - 59                        D+

53 - 56                        D

50 - 52                        D-

0 - 49                          F

The screenshot below demonstrates the execution of this script file.

user1@localhost:~$./mygrade

Enter assignment mark (0 to 40): 25

Enter Test1 mark (0 to 15): 8

Enter Test2 mark (1 to 15): 10

Enter Final Exam mark (1 to 30): 24

  

Your final grade is C+

user1@localhost:~$

Explanation / Answer

Hi below i have written a Awk script which will be available for using Linux Virtual machine for your reference the following sample cade using the script,

Awk can also be used for mathematical computation of fields. Let's demonstrate this with a data file called 'grades.txt' that contains grades of students. Script that will take all the grades, average them equally, and compute the final average and the final grade for each student. At the end, it will compute some statistics about the entire class. Here is the script called 'grades'.