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

Exit command, Your shell must accept the exit command. This command will ...

Your shell must accept the exit command. This command will be in the form: e x i t When you encounter this command, your shell should terminate. Please note that when you

Explain the resolution of an ADC, Explain the Resolution of an ADC. ...

Explain the Resolution of an ADC. Ans. Resolution- It  is  the  smallest  possible  change  in  input  voltage  the same as  the  fraction  of percentage of the full s

How exceptions are handled in java, How exceptions are handled in java? ...

How exceptions are handled in java? Exception handing In Java: A java exception is an object which describes an exceptional condition which has occurred in a piece of code.

What is collective message passing, Q. What is Collective Message Passing? ...

Q. What is Collective Message Passing? In collective message passing all the processes of a group take part in communication. MPI offers a number of functions to apply the coll

What are the different layers in r/3 system, What are the different layers ...

What are the different layers in R/3 system? There are three layer:- Presentation Layer. Application Layer. Database Layer.

Ring, Ring This is a easy linear array where the end nodes are connecte...

Ring This is a easy linear array where the end nodes are connected.  It is equivalent to a engage with wrap around connections. The data transmit in a ring is normally one dire

What is cgi, CGI stands for Common Gateway Interface, and is a mechanism by...

CGI stands for Common Gateway Interface, and is a mechanism by which a browser is permitted to communicate with programs running on a server. If you look at every word in turn it m

Differentiate between exception and validation testing, Differentiate betwe...

Differentiate between exception and validation testing. - Validation testing is done to test the software in conformance to the needs specified. It aims to demonstrate that the

Different possible handover scenarios in a gsm network, Problem: (a) C...

Problem: (a) Cellular systems are based on two types of multiplexing, what are those two types of multiplexing? Describe how they are used to improve channel allocation in cel

Explain the program invisible registers, What are program invisible registe...

What are program invisible registers? Global and local descriptor tables are found in memory system. In order to specify and access the address of these tables, program invisi

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