tags:

views:

93

answers:

1

I am a total newbie to Shell Scripting so please bear with me. I need to create a shell script called script1 that will calculate and then display letter grade of ABC2345.

  1. Read in the following grades from keyboard:
    • Assignments 40%
    • Test1 15%
    • Test2 15%
    • Final exam 30%
  2. Calculate and display the number grade using the weight of each factor above
  3. Convert the number grade to letter grade using the table below:
    • Number Grade Letter Grade
    • 90 - 100 A+
    • 85 - 89 A
    • 80 - 84
    • 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

Any help would be appreciated :) Thank you!

+3  A: 

Well ill go ahead and give you a quick idea... but no logic ;)

i would recommend using a "case statment" and a "while read" or "for" loop... google those items and you should have everything you need.

kSiR
Any update on this via-point? We are here to help but you will not develop the skills needed if we just give it to you ;) (You ever attempting to drink from a firehose?)
kSiR
Thank you guys :) You are right, I had to try and do something myself. And I did. It wasn't that hard at the end.
via_point
good to hear via-point, I think I remember doing the exact same problem (maybe not the same wording) when I was in my Unix 101 class :)
kSiR