Question: This assignment requires only sed and bash, do not use any other languages/utilities. The program should take the names of one or more files that

This assignment requires only sed and bash, do not use any other languages/utilities. The program should take the names of one or more files that are to be redacted as command-line arguments.

Note, that substitutions should only be made for whole matches for all of the criteria that follow. For example, if they are embedded within a larger sequence, such as The password is canterbury987, you should not redact anything within this sequence.

Student IDs consist of abc123, where abc123 represents an actual myUTSA ID. These IDs should be redacted by simply replacing them with the sequence XYZ000.

Student Banner ID numbers must be redacted, and are identifiable as consisting of a sequence beginning with an at-sign (@) followed by precisely eight (8) digits, as in: @83098247. These ID numbers should be replaced simply with the sequence @XXXXXXXX.

Student Grades should be similarly obliterated. Grade letters will consist of a single letter (case-insensitive) from the set {A, B, C, D, F}, optionally followed by a symbol from the set {+, }. Grades (including optional + or - signs) should be redacted through simple substitution with the character X.

Student Grade Point Averages will consist of a single digit from the set {0, 1, 2, 3, 4}, followed by a period / dot (.) and ending with one to three digit decimal places. GPAs should simply be replaced with the sequence X.X.

Lines slated for removal will consist of a line that begins with one or more X characters. When these lines are encountered, they should be deleted in their entirety.

Script Execution

Your program should be invoked through a single bash file (see below) with the filename(s) containing the sensitive data as argument(s).

Example: $ assign2.bash redactme.txt studentdata.txt moredata.txt

Example Input and Output:

This assignment requires only sed and bash, do not use any other

Original redactme.txt: Student Transcript for John Doe, jk1567, 099029832 B+ Semester Fall 2020 CS 3424 Systems Programming CS 3733 Operating Systems CS 4853 Adv. Systems Programming MAT 1013 Calculus | Semester grade point average : D B 2.18 X Academic probation active X Academic holds: 3 Redacted Version of redactme.txt: Student Transcript for John Doe, XYZ000, exxxxxxxx Semester Fall 2020 CS 3424 Systems Programming CS 3733 Operating Systems CS 4853 Adv. Systems Programming MAT 1013 Calculus | Semester grade point average : X.X Original redactme.txt: Student Transcript for John Doe, jk1567, 099029832 B+ Semester Fall 2020 CS 3424 Systems Programming CS 3733 Operating Systems CS 4853 Adv. Systems Programming MAT 1013 Calculus | Semester grade point average : D B 2.18 X Academic probation active X Academic holds: 3 Redacted Version of redactme.txt: Student Transcript for John Doe, XYZ000, exxxxxxxx Semester Fall 2020 CS 3424 Systems Programming CS 3733 Operating Systems CS 4853 Adv. Systems Programming MAT 1013 Calculus | Semester grade point average : X.X

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!