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
Define Flowchart. A  process  of  expressing  an  algorithm  by  a  collection  of  linked  geometric  shapes   containing explanations of the algorithm's steps.

Consider the following set of jobs with their arrival  times, execution time (in minutes), and deadlines. Job Ids Ar r ival Time E xecuti

Performance Bottlenecks can be identified by using monitors. These monitors might be application server monitors, database server monitors, web server monitors and network monitors

PD controller Student should aim for Kp and Kd value that will minimize the steady error with improved rise time and settling time. The amount of over shoot should not be more t

what is the importance of chemistry for computer engineering?

Read in integers until a zero is read in. Keep a total of both the quantity and the sum of the negative integers and the positive integers. Once a zero is read in (signifying the

Identify three specific weaknesses in the design of the websites, derived from your analyses within Questions Part (c) and/or Question Part (a). There should be at least one weakne

The Concept Development journal must contain: An introductory paragraph detailing what conclusions you have drawn from your research and how you intend to proceed. This should b

The implementation of a (non-recursive) binary search of an array. The assumption is that a given array is sorted. We want to see if a particular value, that we'll call the target

Q. Can you explain about Internet Protocol? Internet protocol specifies the rules which define the details of how computers communicate. It specifies exactly how a packet shoul