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

Which two properties are on every validation control, Which two properties ...

Which two properties are on every validation control?  Two properties are:- a) Control to validate b) Error Message.

Formal analysis of visual elements, Formal Analysis: The second step o...

Formal Analysis: The second step of the art critiquing process often begins with an analysis of the artworks formal elements and how they are the organised. The formal elem

Describe about the database marketing application of olap, Database marketi...

Database marketing tool or application helps a user or marketing professional in determining the right tool or plan for his valuable add campaign. This tool haves data from all sou

Nmknl''knl, Ask question bhjjnjnnjnjm#Minimum 100 words accepted#

Ask question bhjjnjnnjnjm#Minimum 100 words accepted#

What is directory, What is Directory?   The device directory or simply ...

What is Directory?   The device directory or simply called as directory records information-such as name, location, size, and type for all files on that certain partition. The

Difference between commit-work and rollback-work tasks, What is the differe...

What is the difference between Commit-work and Rollback-Work tasks? Commit-Work statement "performs" many functions relevant to synchronized execution of tasks.  Rollback-work

Give example of real time processing, Give example of Real time (transactio...

Give example of Real time (transaction) processing Using this illustration of booking seats on a flight, below sequence of events would occur: -  Customer/travel agent conta

Classification according to part of instruction and data, Classification ac...

Classification according to part of instruction and data: According to the parts of instruction and data, following parts are identified under this classification: Scal

What is internet service providers, Q. What is Internet Service Providers? ...

Q. What is Internet Service Providers? Nobody truly owns the Internet however it is maintained by a group of volunteers interested in supporting this mode of information interc

Show layout 84-key keyboards, Q. Show layout 84-key Keyboards? PC 83-ke...

Q. Show layout 84-key Keyboards? PC 83-key was the earliest keyboard provided by IBM with its first Personal Computers (PC). This had 83 keys. Afterwards IBM added one more key

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