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
What is User Defined Functions? User-Defined Functions permit defining its own T-SQL functions that can accept 0 or more parameters and return a single scalar data value or a t

Write the HTML code to accomplish the web page to insert an image onto a page using good.gif as image and having "welcome" as the ALT text. The HTML code to accomplish the web

Differentiate between Protection and Security Operating system contains a collection of objects, hardware or software. Every object has a unique name and can be accessed via a

At a shop of marbles, packs of marbles are prepared. Packets are named A, B, C, D, E …….. All packets are kept in a VERTICAL SHELF in random order. Any numbers of packets with thes

Q. Explain Parameter Passing in Procedures? Parameter passing is a very vital concept in assembly language. It makes assembly procedures more general. Parameter can be passed t

How are applications of generic framework for e-commerce executed? To execute applications, this is essential to have Supporting Information and Organizational Infrastructure a

Difference between the fork -join and begin-end. The fork - join keywords: Groups several statements together.Cause statements to be evaluated in parallel (all at the same

Q. What is Stack and register manipulation? Stack and register manipulation: If we create stacks, stack instructions prove to be useful. LOAD IMMEDIATE is a good illustration

Explain the term - Instruction execution We  know  that  the  fundamental  function  performed  by  a  computer  is  the  execution  of  program. The program that is to be exec