, , , , , ,

[SOLVED] Cs 3423 systems programming-asignment 1

$25

File Name: Cs_3423__systems_programming-asignment_1.zip
File Size: 376.8 KB

5/5 - (1 vote)

Shell ScriptingFor this assignment, you will use bash create a simple course catalog for administrators to update the details of each course offered by their department. The system will store basic information about each course, allowing the user to create, read, update, and delete them.This assignment requires only the utilities used so far in the lecture notes. Do not use sed, awk, or any programming languages or utilities not yet covered in the lecture notes.Tip: Filenames in the native Linux filesystem are case-sensitive. Thus, without proper consideration, a course whose associated filename was created as cs3423.crs (based on lowercase input given for the courses department code the time of its creation) will not also be associated with the file CS3423.crs. This is not desirable behavior, however, as users may unexpectedly enter either uppercase or lowercase department codes when using your script.Therefore, you may utilize a bash feature (known as case modification parameter expansion) that enables you to easily convert the contents of a variable to its uppercase equivalent. For example, this feature can be utilized to produce the capitalized contents of the variable containing a department code by simply writing ${dept_code} instead of $dept_code when building the filename you will use for a particular course.Tip: Note, that when prompted to enter a department code and course number, you should enter these values as two separate tokens separated by a space. Otherwise, it would be necessary to perform complex token-splitting to separate these values, which is outside the scope of this assignment. For example, when prompting the user:Enter a department code and course number: You should enter cs 3423, not cs3423!Course information will be stored in text files.* Department names may contain whitespace. You should account for names with multiple tokens (e.g., ESL English as a Second Language = dept_code = ESL, and dept_name = English as a Second Language)ESL English as a Second LanguageLiteracy in a Second Language MWF 8/26/19 12/13/19352When the script is run, the following should occur. All script output should appear exactly as it appears below.Enter one of the following actions or press CTRL-D to exit.C create a new course recordR read an existing course recordU update an existing course record D delete an existing course recordE update enrolled student count of existing courseT show total course count(a) From the terminal, read the following one at a time:where date is the output from the date command and dept_code, course_num, and course_name are the corresponding values.(d) If the course already exists, print the following error and continue with the script.The script should accept all seven inputs before checking if the record exists.ERROR: course already existsEnter a department code and course number:3423).Course number: course_numCourse name: course_nameScheduled days: course_schedCourse start: course_startCourse end: course_endCredit hours: course_hoursEnrolled Students: course_size(d) If the course is not found, print the following error instead and continue with the script.ERROR: course not foundcs 3423).where date is the output from the date command and dept_code, course_num, and course_name are the corresponding values.(e) If the course is not found, print the following error and continue with the script. The script should accept all nine inputs before checking if the record exists.ERROR: course not foundcs 3423):Enter a course department code and number:where date is the output from the date command and dept_code, course_num, and course_name are the corresponding values.ERROR: course not foundcs 3423):Enter a course department code and number:Enter an enrollment change amount:where date is the output from the date command and dept_code, course_num, course_name, and change_amt are the corresponding values.(f) If the course record is not found, print the following error and continue with the script. The script should accept the enrollment change amount before checking if the record exists.ERROR: course not found(a) Print the total number of .crs files within the data directory:Total course records: total where total is the total .crs files.ERROR: invalid optionAn initial data set can be found in /usr/local/courses/ssilvestro/cs3423/Fall19/assign1. Copy this to your own assignments directory.Your program should consist of seven bash files with the following names (case sensitive):Your program must work with the input provided in a1Input.txt. To test it:

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[SOLVED] Cs 3423 systems programming-asignment 1
$25