Question: Given Part 1, please do 6-11. Please include the code Part I: LAB: On a Linux virtual machine (or cs1, cs2) terminal windows start the
Part I: LAB: On a Linux virtual machine (or cs1, cs2) terminal windows start the 'script' command to capture the interaction with a bash shell into a file named wk06 RE_and textprocessing exercises.typescript', then perform the following operations: 1. Create a directory named mydata on your home directory 2 Go to that directory and download the files wk06data.txt and mypage.html into that directory Since the file wk06datatxt was created on a Windows (MS-DOS) machine every line ends with a CR (Carry Return, OxOD) and then LF (Line Feed 0x0A) characters. On the Unix environment a line in text files ends with a LF only. s. Verify that the file you have downloaded is still in MS-DOS text format (i.e. a line ending with a CR and then LF You should use the file command to verify. The output of the file command when applying to wk06data.txt should be: wk0 6data.txt: ASCII text, with CRLF line terminators Using the sed tool convert the file wk06data.txt from MS-DOS to Unix text format and store that in a new file named wk06data. Verify that the file is in Unix text format. Again the file command should be used for this verification and the output should be wk06data: ASCII text 4. s. Run command Is I wk06data 6. Use the grep command to display all lines in the file wk06data that contain the word email of Email. 7. Then display all lines in the file that does not contain the word email or Email. Use the grep command to display all fruits that are a berry in the wk06data 8. file. Then display all fruits that are not a berry in the wk06data file. For 8 and 9 make sure that only lines that in the fruits list section are 9. displayed. in a file named mypage. Display the content of file mypage. email addresses in the file wk06data to a new file named emails.list, A valid 10. Use sed to remove all HTML tags in the file mypage.html and put the result 11. Use grep command and redirection to copy only the lines that have valid email address is the one that is in the
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
