Write an awk program - unix , Computer Engineering

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

Posted Date: 3/14/2013 2:07:20 AM | Location : United States







Related Discussions:- Write an awk program - unix , Assignment Help, Ask Question on Write an awk program - unix , Get Answer, Expert's Help, Write an awk program - unix Discussions

Write discussion on Write an awk program - unix
Your posts are moderated
Related Questions
Differentiate between $display and $strobe These commands have similar syntax, and display text on screen during simulation. $display and $strobe display once every time they a

State about the Three-dimensional digitizers Three-dimensional digitizers use sonic or electromagnetic transmissions to record positions. One electromagnet transmission method

Problem (a) Forensic methodology consists of three phases. Briefly explian these three phases. (b) Sometimes it's best not to perform hard-disk acquisition. Provide two

LoadRunner works by making virtual users who take the place of real users operating client software, such as sending requests using the HTTP protocol to IIS or Apache web servers.

How does computer started?

The Karnaugh map for a SOP function is given below in figure. Determine the simplified SOP Boolean expression. Ans. F= B'C' + A'C'D + B'D'

E-commerce is working in tandem with the real shop and if all the products are online running the e-commerce shop is becoming simpler. Owner log in on the special admin side of the

Is it true that the Logical Database reads the data from the database tables using Select Statements. Yes. We are coding that in Database part of LDB.

Q. Show the Simple Arithmetic Application? The question is why can't we simply employ XCHG instruction with 2 memory variables as operand? To answer the question let's look int

What is refactoring? Refactoring is explained as the changes to the internal structure of software to improve its design without changing its external functionality. It is an e