Question
Write a bash script that displays the number of courses a student is registered in. The program checks two files The first file NameID.txt which
Write a bash script that displays the number of courses a student is registered in. The program checks two files The first file NameID.txt which contains students ID and students names. The ID is a 6 digit decimal number, and the name could be on one of three formats.
First name last name
First name middle initial last name
First name middle name last name
Example
123456 John Doe 345678 John P. Doe 987654 JohnPublicDoe
Keep in mind that these three names are for three different students.
The second file NameCourse.txt is on the form Course number, Student Name
Example
EECS2021 John Doe EECS2021 John P. Doe EECS2031 John Doe EECS4201 John Doe
The program reads a student ID without any prompt, and then it displays the number of courses the student is registered in. If the student is not registered in any course displays 0 CPU % q21.sh 123456 3 CPU %
Where John Doe (with ID=123456) is registered in 3 courses
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started