Question: ADVANCED PIPELINE COMMANDS Problem 5 (10 points): Answer the following questions about the cut and tr commands: a) If you have a file called data.csv

ADVANCED PIPELINE COMMANDS Problem 5 (10 points): Answer the following questions about the cut and tr commands: a) If you have a file called data.csv with several lines of data, each line containing comma-separated values, give the AWK command to print off the 8th number on each line (you have to tell AWK to use a comma as the separator using the -F flag, so look up this flag to see how to use it properly). b) Give the cut command for accomplishing the same thing that you did with AWK in part (a). c) If you have a file called records with many lines of data, each line having values separated by a : character, how would you obtain the 5th value of each line using the cut command? d) Assume the same things from part (c), except now you want to obtain the 3rd character of the 5th value on each line. How would you do this using the cut command? HINT: You may use piping here. e) Assume you want to read as input the file names.txt, change every lowercase letter to an uppercase letter and every # to a -, then save the result back to that same file (overwriting it). How would you do this with the tr command? HINT: Use piping and file redirection. ADVANCED PIPELINE COMMANDS Problem 5 (10 points): Answer the following questions about

ADVANCED PIPELINE COMMANDS Problem 5 (10 points): Answer the following questions about the cut and tr commnands a) If you have a file called 'data.csv with several lines of data, each line containing comma-separated values, give the AWK command to print off the 8th number on each line (you have to tell AWK to use a comma as the separator using the -F flag, so look up this flag to see how to use it properly) b) Give the cut command for accomplishing the same thing that you did with c) If you have a file called 'records' with many lines of data, each line having d) Assume the same things from part (c), except now you want to obtain the 3rd e) Assume you want to read as input the file 'names.txt', change every lowercase AWK in part (a). values separated by a ':' character, how would you obtain the 5th value of each line using the cut command? character of the 5th value on each line. How would you do this using the cut command? HINI: You may use piping here letter to an uppercase letter and every to a '-, then save the result back to that same file (overwriting it). How would you do this with the tr command? HINT Use piping and file redirection

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!