Question: This is the full homework. Just answer 5,6,7,8 homework 3. Unix. Homework 3 We'll be using the classes.txt file we used in the lab; you'll
This is the full homework. Just answer 5,6,7,8
homework 3. Unix.

Homework 3 We'll be using the classes.txt file we used in the lab; you'll need to either work on snowball or download the file to work with on your computer. Come up with a command to answer each question. Be sure to test each command (you'll be turning in your bash history too). grep and sed 1. Write a command to find every class with Data in the name. 2. Write a command to find every class with Machine in the name. 3. Write a command to find every class whose description includes "java". It shouldn't matter if the letters are capitalized or not. 4. Write a command to find every class whose name ends in "computing". It shouldn't matter if the letters are capitalized or not. 5. Write a command to find every class whose course-number starts with 33. (A CRN can appear at any point in a line; you only want the lines that are headings for entries, like "CSC 1234: Computering".) 6. Write a command to find every class whose course-number is even. (Hint: the course-number is even if the last digit is even.) 7. Write a command to find every 4000-level class. (Again, you only want the lines that are headings for an entry.) 8. Write a command to remove all the course-title lines. 9. Write a command to remove all the credit hour and prerequisite lines. (You can do this with grep or sed. You can do this with one command, but you can also use 2 in a pipeline.) 10. Write a command to replace all the 4000-level course-numbers with "senior-level". 11. Write a command to remove the course-number prefix from the header lines. (So, for the line "CSC 1234: Computering", remove the "CSC 1234: " part.) 9. Write a command to remove all the credit hour and prerequisite lines. You can do this with grep or sed. You can do this with one command, but you can also use 2 in a pipeline.) 10. Write a command to replace all the 4000-level course-numbers with "senior-level". 11. Write a command to remove the course-number prefix from the header lines. (So, for the line "CSC 1234: Computering", remove the "CSC 1234: "part.) Homework 3 We'll be using the classes.txt file we used in the lab; you'll need to either work on snowball or download the file to work with on your computer. Come up with a command to answer each question. Be sure to test each command (you'll be turning in your bash history too). grep and sed 1. Write a command to find every class with Data in the name. 2. Write a command to find every class with Machine in the name. 3. Write a command to find every class whose description includes "java". It shouldn't matter if the letters are capitalized or not. 4. Write a command to find every class whose name ends in "computing". It shouldn't matter if the letters are capitalized or not. 5. Write a command to find every class whose course-number starts with 33. (A CRN can appear at any point in a line; you only want the lines that are headings for entries, like "CSC 1234: Computering".) 6. Write a command to find every class whose course-number is even. (Hint: the course-number is even if the last digit is even.) 7. Write a command to find every 4000-level class. (Again, you only want the lines that are headings for an entry.) 8. Write a command to remove all the course-title lines. 9. Write a command to remove all the credit hour and prerequisite lines. (You can do this with grep or sed. You can do this with one command, but you can also use 2 in a pipeline.) 10. Write a command to replace all the 4000-level course-numbers with "senior-level". 11. Write a command to remove the course-number prefix from the header lines. (So, for the line "CSC 1234: Computering", remove the "CSC 1234: " part.) 9. Write a command to remove all the credit hour and prerequisite lines. You can do this with grep or sed. You can do this with one command, but you can also use 2 in a pipeline.) 10. Write a command to replace all the 4000-level course-numbers with "senior-level". 11. Write a command to remove the course-number prefix from the header lines. (So, for the line "CSC 1234: Computering", remove the "CSC 1234: "part.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
