Question: CSC3320 System Level Programming Lab Assignment 4 - Part 1 (In- Lab) Instructor: Yuan Long Purpose: Practiccs on the regular expressions and grep family commands


CSC3320 System Level Programming Lab Assignment 4 - Part 1 (In- Lab) Instructor: Yuan Long Purpose: Practiccs on the regular expressions and grep family commands to proccss texts in files. Note: Please follow the instructions below and write a report by answering the questions and upload the rport (named as Lab4_P1_FirstNamcLastName.pdf or Lab4 FirstNameLastName.doc) to the folder "Lab4-Part InLab" of the Dropbox in the iCollege system add the lab ass t NUMBER and your NAME at the top of r file s a) Display the pathname of your current directory b) Move up one levcl to parent dircctory c) Move to the root directory d) Go hack to your home directory c) Print thc content of the filc test.txt in your home directory onto the screen. f) Rename myfilel as myfile2 (assuming both files are in the home directory). Text AB Basic Regular Expression Match? VB Xhellothisis30 AaBbCc,AaBbCc A bcd 3. Open your terminal and connect to snowball server. Change your directory to your home directory (cd ), and then create a new directory named as "Lab4" (mkdir Lab4). After that, go to directory Lab4 (cd Lab4) and please download the file "CSC Course.txt" by the following command (internet access required): Optional Part (not for grading): 1) $ sed-E-n 's/ (CSC13[0-9](3)) {.*)/\1/p. SC-Course . txt Attach a screenshot of the output and what is the functionality of the command. cp home/ylog/public/csc Course.txt CSC Course.txt Be sure t succeeds using "ls" to see the file name "CSC_Course.txt" listed. 2) $ awk -FCSC0-1/print CSC Course.xt grep and egrep can read a file and filter out the lincs not containing the matches of the regular expression defined under the pair of sngle Attach a screenshot of the output and what is the functionality of thc command. 3) $ id-9114,, (H)(..)3/p' sed Attach a screenshot of the output and what is the functionality of the command -E -n 's/ (CSC csc-course . txt Note: marks a single space. 1) Smore CSC Course.txt Functionality: Check the content of "CSC_Course.txt" using more. Note: When viewing the file, you may need to use command f (forward one screen), b (backward one screen) and q(quit). 4) $ 's/CSC) {.*)/\1/p. SC-Course . txt Attach a screenshot of the output and what is the functionality of the command. cp home/ylog/public/csc Course.txt CSC Course.txt Be sure t succeeds using "ls" to see the file name "CSC_Course.txt" listed. 2) $ awk -FCSC0-1/print CSC Course.xt grep and egrep can read a file and filter out the lincs not containing the matches of the regular expression defined under the pair of sngle Attach a screenshot of the output and what is the functionality of thc command. 3) $ id-9114,, (H)(..)3/p' sed Attach a screenshot of the output and what is the functionality of the command -E -n 's/ (CSC csc-course . txt Note: marks a single space. 1) Smore CSC Course.txt Functionality: Check the content of "CSC_Course.txt" using more. Note: When viewing the file, you may need to use command f (forward one screen), b (backward one screen) and q(quit). 4) $ 's/CSC