Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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
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 variableStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started