Question: This is in Unix THE AWK PROGRAMMING SYSTEM Problem 4 (6 points): Answer the following questions about AWiK _data processing a) The AWK programming language

This is in Unix

This is in Unix THE AWK PROGRAMMING SYSTEM Problem 4 (6 points):

THE AWK PROGRAMMING SYSTEM Problem 4 (6 points): Answer the following questions about AWiK _data processing a) The AWK programming language focuses on b) Assume you have a file called 'processNumbers.awk' containing AWK commands. Give the shell command line to execute the AWK commands in this Give AWK commands for accomplishing each of the following c) Print the total number of lines from a file named 'total.txt' d) Print the 2nd last field (the field directly before the last field) of each line from a file named 'second.txt' e) Assume you have a file called 'items' that contains a list of items, one item per line. Also assume that on each line, the 4th field on that line contains the price of that item. Some of the items do not have a price listed, and those lines only have 2 fields. Print the total price for all the items that have a price f) Exchange the first and the last fields of every line, and then print the lines (you can print each line directly after the exchange). After printing all of the lines, print out the message Finished!". Assume the file name is 'exchange.txt. HINT: To switch the two fields around, you'll need to use a temporary variable

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!