Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Storing Course Information Course information will be stored in text files. Assignment 1 : Shell Scripting Page 1 of 6 1 . Files will be
Storing Course Information Course information will be stored in text files.
Assignment : Shell Scripting
Page of
Files will be stored inside a directory called data within the same directory as your script.
Each file will be named based on the combination of a department code and a course number, which consists of two or three letters followed by an integer with exactly four digits, followed by the extension crs
A course file consists of exactly these lines:
deptcode two or three letter abbreviation deptname string with probable whitespace
coursename string with probable whitespace
coursesched string consisting precisely of either MWF or TH coursestart string with no whitespace courseend string with no whitespace coursehours credit hours, unsigned integer coursesize enrolled students, unsigned integer
Department names may contain whitespace. You should account for names with multiple tokens egESL English as a Second Language deptcode ESL and deptname English as a Second Language
Example file named eslcrs
Script Execution
When the script is run, the following should occur. All script output should appear exactly as it appears below.
Upon running your script, the user should be presented with the following menu:
Enter one of the following actions or press CTRLD to exit.
C create a new course record
R read an existing course record
U update an existing course record
D delete an existing course record
E update enrolled student count of existing course
T show total course count
The user then enters a onecharacter action upper or lowercase leading to one of the following. C: a course is created
a From the terminal, read the following one at a time: i Department code twotothree character string
ii Department name string possibly containing whitespaceESL English as a Second Language Literacy in a Second Language MWF
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