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
A sample rate of            is required for a good quality representation of telephone conversation. A sample rate of 50 times/second /mile of distance travelled are needed fo

Assume that a graph has a minimum spanning tree already computed.  How fastly can the minimum spanning tree be updated if a new vertex and incident edges are added to G? If the

Layered Architecture of EDI: EDI is most commonly applied in the implementation and settlement phases of the trade cycle. In implementation of a simple trade exchange, the cust

list advantages of array

Ferroelectric RAM is a random-access memory same in construction to DRAM but uses a ferroelectric layer rather of a dielectric layer to achieve non-volatility. FeRAM is one of a gr

Now let's get a grip on how to add interactivity to your web documents by way of the tag. With this tag you can add to your web pages a guestbook, surveys, order forms, ge

Q. Determine the performance of a parallel algorithm? One more method of determining the performance of a parallel algorithm can be performed after calculating a parameter know

Evidence of intelligent behavior - Artificial Intelligence: Machines mean they could simply be personal computers, or they could be robots with embedded automative systems, or

You can't plan only for the present phase of the project as your future activities are still coarse granular. To have good planning you require to have fine granularity w.r.t the t

create a stored procedure to debit a bank account user must enter account no. and amount to debited from account .the minimum balance in account should be 500. if the debited amoun