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
super ascii string checker

Why a task can n ot return a value? If tasks can return values then Let's take a look at the below example. A=f1(B)+f2(C); and f1 and f2 had delays of say 5 and 10? Whe

Backward Chaining: In generally given that we are only interested in constructing the path whether we can set our initial state to be the theorem statement and search backward

A grammar for a programming language is a formal description of ? Structure is a formal description for a programming language.

Implement the Y(A, B, C) = ∑(2,3,5,6) function using 4-to-1 multiplexer.   Ans. Y(A,B,C)=∑(2,3,5,6) Here we take B,C as the select bits also A as input. To select the input we can

Q. Describe the Vertical Frequency or cycle? Like a Fluorescent lamp, the screen has to repeat same image many times per second to display an image to user. The frequency of th

Learning Weights in Perceptrons In detail we will look at the learning method for weights in multi-layer networks next chapter. The following description of learning in percept

The grade of service is measured in (A) Percentage                                  (B)  Number (C)  Fractional Number                    (D)  Logarithmic Number  Ans

Search in Problem Solving: If Artificial Intelligence can inform that the other science about anything, it is about problem solving and, in particular, how to research after s

Syntax and Semanticsx and Semantics for First-order logic - artificial intelligence: Propositional logic is limited  in its expressiveness: it may just represent true and false