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
Develop a regular expression for Real number and Real number with optional fraction (i) A regular expression for real number is [+ | -] (d)+. (d)+ (ii) A regular expression

These days, they're pretty much obsolete; they're definitely system-particular. They had to do with 16-bit programming under MS-DOS and perhaps some early on versions of Windows. I

Illustrate the role of World Wide Web into the field of e-commerce. In the 1990 year, the advent of the World Wide Web upon the Internet represented a turning point into e-com

List out the main requirements between page replacement policies which should be satisfied by a page replacement policy? The major requirements that should be satisfied

difference between pure and impute inter preter

The field SY-DYNR refers to Number of the current screen.

What are Grouping Notations These notations are boxes into which a model could be decomposed. Their elements includes of packages, frameworks and subsystems.

Enumerate the data structures used during the first pass of the assembler. Indicate the fields of these data structures and their purpose/usage. Three main data structures used

Intranets are mainly "small" Internets. They use same network facilities that Internet does, though access is restricted to a limited sphere. For example, a company can set up an i

draw input and output charectoristics of BJT and justify CE configuration provides large current amplification