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

Gralands robots, You have been contacted by Jean-Luc Picard commanding offi...

You have been contacted by Jean-Luc Picard commanding officer of Star Trek: The Next Generation. The Commander needs your support to develop a software routine to simulate the Robo

Multi tasking environment, Q. Explain about Multi tasking environment? ...

Q. Explain about Multi tasking environment? Multi tasking uses parallelism by: 1) Pipelining functional units are pipe line mutually 2) Simultaneously employing multiple

Programming project, l need a help for my project pllz:) Write a program th...

l need a help for my project pllz:) Write a program that will simulate ATM machine. The Program should prompt the user to enter a valid PIN password number of 5 digits (PIN: 12312)

What are the five popular hashing functions, Five popular hashing functions...

Five popular hashing functions are as follows:- Division Method Midsquare Method Folding Method Multiplicative method Digit Analysis

Define memory allocation functions, The various memory allocation functions...

The various memory allocation functions are described below: (i) malloc( ) : It is a memory allocation function that assigns requested size of bytes and returns a pointer to t

Mutability and accessibility of primary memory, Mutability and Accessibilit...

Mutability and Accessibility of primary memory: Mutability: Read/write storage or mutable storage  It provides permit ion for the information to be overwritten at

Ifstream on the input file, Write a main function that opens an ifstream on...

Write a main function that opens an ifstream on the input file, "person.dat".  If the stream cannot be  opened, output an error message and exit.       The file format is as foll

History of information technology and organisations, History of Information...

History of Information Technology and Organisations The increasing sophistication in information systems and the growth in their use have been influenced by three main factors

Explain parallelism conditions, Parallelism Conditions As discussed ear...

Parallelism Conditions As discussed earlier, parallel computing needs the segments to be executed in parallel should be independent of each other. So before executing paralleli

Non-repudiation achieved in designing e-cash based system, How can non-repu...

How can non-repudiation be achieved into designing e-cash based system? E-cash is fundamentally an online solution. The buyer should validate the coins by the issuer so as to g

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