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

What are the principles of transport layer, Q. What are the principles of t...

Q. What are the principles of transport layer? Transport layer: This layer is the first end-to-end layer. Header of transport layer includes information which helps send the

Registers used in organisation of an associative memory, In the organisatio...

In the organisation of an associative memory, many registers are used: Comparand Register (C): This register is used to grasp the operands, which are being searched for, or

Simple maze game, The following is a requirements specification for a simpl...

The following is a requirements specification for a simple game based on a player moving through a maze of connected rooms from an entrance door to an exit door. The required sy

Application and function areas - artificial intelligence, Application and F...

Application and Function Areas - artificial intelligence: Individual applications and function often drive "AI" research much more than the long term relative field described

Digital logic, write a short note on the tri state ttl inverter

write a short note on the tri state ttl inverter

Explain opening files for reading only in c, Opening Files for Reading Only...

Opening Files for Reading Only     : A data file is a file that you can open and read its contents visually - for example, C source files, .dat files, HTML etc - anything that look

PADOVAN STRING, write a program that counts the number of occurrences of th...

write a program that counts the number of occurrences of the string in the n-th Padovan string P(n)

Placement algorithm - process allocation, Placement algorithm - computer ar...

Placement algorithm - computer architecture: Different strategies can be taken as to how space is allocated to processes: First fit : Allocate the first hole that is la

Explain status and control registers, Q. Explain Status and Control Registe...

Q. Explain Status and Control Registers? For control of numerous operations several registers are used. These registers can't be used in data manipulation though content of som

Typewriters information distribution, TYPEWRITERS : Typewriter is the most...

TYPEWRITERS : Typewriter is the most common machine used in almost all offices. Typewritten letters are attractive in appearance as compared to handwritten ones. The same matter 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