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
Forward Chaining: Now we have suppose we have a set of axioms that we know are true statements about the world. Whether we set these to each be an initial state of the segoal

Define DMA controller. The I/O device interface control circuit that is used for direct memory access is called as DMA controller.

What is the Octant to hexadecimal conversion of 734 ? Ans. (734) 8      = (1 D C) 16 0001 ¦ 1101 ¦ 1100 1         D         C


Typewriters with special attachments Certain special attachments can be used to the typewriter for typing work of a special nature. These are: The continuous stationery dev

What do you understand by Electronic Funds Transfer?  Electronic Funds Transfer: It's an electronic payment method that transfers the money value from one bank account to

Define the term- Verification It is a way of preventing errors when data is copied from one medium to another (for instance from paper to disk/CD or from memory to DVD, etc.).

What is Parallel Sections Construct? The parallel sections construct is a shortcut for specifying a parallel construct comprising one sections construct however no other statem

Implication connective - Modus ponens rule: We notice that this is a trivial example, so it highlights how we use truth tables: as the first line is the only one when both abo

Define static memories? Memories that consists of circuits capable of retaining their state as long as power is applied is known as static memories