Write an awk program - unix , Computer Engineering

Assignment Help:

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


Related Discussions:- Write an awk program - unix

Specifying constraint problems, Specifying Constraint Problems: Howeve...

Specifying Constraint Problems: However as with most successful "AI" techniques there constraint solving is all about solving problems as: somehow phrase the intelligent task

Software engineering, how many errors will be left after defect amplificat...

how many errors will be left after defect amplification and removal method on the following data design=40 analysis=30 maintenance=20 testing 35 coding 25 take 75% removal efficie

Register-to-register architecture, Register-to-Register Architecture : In t...

Register-to-Register Architecture : In this organization, results and operands are accessed not directly from the main memory by the scalar or vector registers. The vectors which a

Representation in prolog - logic programs, Representation in Prolog - Logic...

Representation in Prolog - Logic Programs: If we justimpose some additional constraints on first-order logic, so than we get to a representation language knowing as logic prog

Determine capacity in bytes of a certain memory, A certain memory has a cap...

A certain memory has a capacity of 4K × 8 (i)  How many data input and data output lines does it have? (ii) How many address lines does it have? (iii) What is its capacity in bytes

Why cyclomatic complexity is important, Why cyclomatic complexity is import...

Why cyclomatic complexity is important? Cyclomatic complexity is computed using a graph that verifies the control flow of the program. The nodes of the graph correspond to the

How to pass data from list to report, How to pass data from list to report?...

How to pass data from list to report? ABAP/4 gives three ways of passing data: ---Passing data automatically using system fields ---Using statements in the program to tak

Finite automata, applications of context free grammar

applications of context free grammar

Define locality of reference, Define locality of reference? What are its ty...

Define locality of reference? What are its types?  During the course of implementation of a program memory references by the processor for both the instruction and the data ten

Explain clearly the difference between j-cuts and l-cuts, Question: (a)...

Question: (a) Explain clearly the difference between J-cuts and L-Cuts. (b) What is the function of the rate stretch tool? (c) What's the difference between an Image Matt

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd