This is the output generated by the second sample input file. Note that the commands entered from STDIN are in bold here. Depending on your shell, they may or may not be actually seen if you redirect that file to your script.
-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 2

A) Sort by Last Name
B) Sort by Final Grade
A
Richard Conlan 0
David Foster 102.5
Mister Jones 0
Paul Lalli 92.25
Justin McGuire 87.4
John Smith 74.5

-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 2

A) Sort by Last Name
B) Sort by Final Grade
b
David Foster 102.5
Paul Lalli 92.25
Justin McGuire 87.4
John Smith 74.5
Richard Conlan 0
Mister Jones 0

-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 4

Please enter a student: jonesm
987654321 successfully removed from the system.

-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 4

Please enter a student: 864520193
864520193 successfully removed from the system.

-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 2

A) Sort by Last Name
B) Sort by Final Grade
B
David Foster 102.5
Paul Lalli 92.25
Justin McGuire 87.4
John Smith 74.5

-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 2

A) Sort by Last Name
B) Sort by Final Grade
a
David Foster 102.5
Paul Lalli 92.25
Justin McGuire 87.4
John Smith 74.5

-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 6

Please enter a student: 660066466

Paul Lalli
Homework: 100, 95
Exam: 80

H)omework Grade
E)xam Grade
e
Change which grade?
1) 80
1
Please enter the new grade:
100
-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 5

Please enter a student: smithj

H)omework Grade
E)xam Grade
e
Enter the new grade:
99
-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 6

Please enter a student: 123456789

John Smith
Homework: 59, 76
Exam: 85, 99

H)omework Grade
E)xam Grade
h
Change which grade?
1) 59
2) 76
2
Please enter the new grade:
90
-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 3

Enter the new student's last name: ComeLately
Enter the new student's first name: Johnny
Enter Johnny ComeLately's RCS Id: comelj
Enter Johnny ComeLately's RIN: 456321789

-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 1

Please enter a student: comelj

Johnny ComeLately: comelj - 456321789
Homeworks: 
Exams: 
Final Grade by 70/30: 0
Final Grade by 60/40: 0

-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 4

Please enter a student: 456321789
456321789 successfully removed from the system.

-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 5

Please enter a student: lallip

H)omework Grade
E)xam Grade
e
Enter the new grade:
94
-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 5

Please enter a student: 660066466

H)omework Grade
E)xam Grade
e
Enter the new grade:
23
-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 1

Please enter a student: lallip

Paul Lalli: lallip - 660066466
Homeworks: 100, 95
Exams: 100, 94, 23
Final Grade by 70/30: 89.95
Final Grade by 60/40: 87.4333333333333

-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 6

Please enter a student: 660066466

Paul Lalli
Homework: 100, 95
Exam: 100, 94, 23

H)omework Grade
E)xam Grade
e
Change which grade?
1) 100
2) 94
3) 23
3
Please enter the new grade:
95
-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 5

Please enter a student: fosted

H)omework Grade
E)xam Grade
H
Enter the new grade:
0
-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 2

A) Sort by Last Name
B) Sort by Final Grade
A
David Foster 41
Paul Lalli 97.15
Justin McGuire 87.4
John Smith 81.5

-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 2

A) Sort by Last Name
B) Sort by Final Grade
B
Paul Lalli 97.15
Justin McGuire 87.4
John Smith 81.5
David Foster 41

-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 1

Please enter a student: lallip

Paul Lalli: lallip - 660066466
Homeworks: 100, 95
Exams: 100, 94, 95
Final Grade by 70/30: 97.15
Final Grade by 60/40: 97.0333333333333

-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 1

Please enter a student: 867530999

Justin McGuire: mcguij2 - 867530999
Homeworks: 79
Exams: 100
Final Grade by 70/30: 85.3
Final Grade by 60/40: 87.4

-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 1

Please enter a student: smithj

John Smith: smithj - 123456789
Homeworks: 59, 90
Exams: 85, 99
Final Grade by 70/30: 79.75
Final Grade by 60/40: 81.5

-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 1

Please enter a student: 474747474

David Foster: fosted - 474747474
Homeworks: 0
Exams: 100, 105
Final Grade by 70/30: 30.75
Final Grade by 60/40: 41

-------------------------------
1) Print Student Info
2) Print All Students
3) Add Student
4) Remove Student
5) Add Grade
6) Change Grade
0) Save changes and exit
Enter an option: 0
Changes saved to samplegrades.txt