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
Load address for the first word of the program is called? Ans. load address origin is known as load address for the first word of the program.

Number systems   Consider a decimal number:               7654.32   Short hand for:            7 * 103 + 6*102 + 5* 101 + 4*100 + 3*10 -1  + 2*10 -2   Likewise

Dynamic address translation :  If, when executing an instruction, a CPU fetches an instruction located at a specific virtual address, or fetches data from a particular virtual

Basically I need implement program using LC3 assembly language where I can type any message using ASCII code (this will my input). Then read the output in cipher text. It has to be

Explain the relationship amongst Translated address and Linked address. Translated address: Address assigned through the translator Linked address: Address assigned

What are Different types of Verilog Simulators? There are essentially two types of simulators available. -  Event Driven -  Cycle Based

describe briefly about the c token with suitable example program

What is the window of the working set of a process? The window of the working set of a method is the total number in which the method had referred the set of pages in the work

Define dynamic linking.  Dynamic linking is same to dynamic loading, rather that loading being postponed unless execution time, linking is postponed. This feature is usually us

what is java?