Write an awk program - unix , Computer Engineering

Assignment Help:

Write an AWK program which takes the following input file and processes it.

$cat data.txt
John Do 111-1111 English 90 Maths 80
Alice Do 222-2222 English 90 Maths 90 Chemistry 93

The input file has first 3 fields fixed as first name, last name, and student id. After the student id, it has a variable number of fields which has a pair of name of a subject and points scored in that subject. Your output should print the full name of the student, number of subjects taken, and his/her average score. The output corresponding the above input file is as follows:

$awk -f avgerage.awk data.txt

John Do: 2 subjects taken, average = 85

Alice Do: 3 subjects taken, average = 91


Related Discussions:- Write an awk program - unix

Processor technology , Processor Technology: Computers consist of elec...

Processor Technology: Computers consist of electronic components assembled in a design or "architecture" that will perform necessary functions of input, output, computation an

Appropriate problems for ann learning , Appropriate Problems for ANN learni...

Appropriate Problems for ANN learning - artificial intelligence-  As we did for decision trees, it is essential to know when ANNs are the correct representation scheme for the

Explain host function, Explain Host function Host function: accepts nam...

Explain Host function Host function: accepts name of floating-point guest function with single floating-point argument as its first argument, evaluates this function at x (the

Change directory command, Your shell must accept a change directory command...

Your shell must accept a change directory command. This will be in the form: cd path  where cd is the change directory command and the path is what you will change the direct

How do you split hydrogen and oxygen gases, Q. How do you split Hydrogen an...

Q. How do you split Hydrogen and Oxygen gases in industrial electrolysis of water process? Answer:- In oxygen, electrolysis and hydrogen gas are produced at different elec

List out the evaluation order for the expression tree, Draw an expression t...

Draw an expression tree for the string. f + (x+y) *((a+b)/(c-d)). Indicate the register requirement for each node and list out the evaluation order for the expression tree. For

What is blocking probability, What is blocking probability? Blocking ...

What is blocking probability? Blocking Probability: The blocking probability P is described as the probability like all the servers in system are busy. If all the servers ar

C, Drawbacks of linear arrays

Drawbacks of linear arrays

replacing option of a copy statement, What is the point of the REPLACING o...

What is the point of the REPLACING option of a copy statement? Ans) REPLACING permits for the similar copy to be used more than once in the similar code by changing the replac

Which interface controls what is shown on the p.c., Which interface control...

Which interface controls what is shown on the p.c.? Presentation Interface  controls what is shown on the p.c

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd