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

Evidence of intelligent behavior - artificial intelligence, Evidence of int...

Evidence of intelligent behavior - Artificial Intelligence: Machines mean they could simply be personal computers, or they could be robots with embedded automative systems, or

Explain about communication displays and matrix, Q. What is communication D...

Q. What is communication Displays and Matrix? Communication Displays Communication displays offer support in concluding frequency of communication whether congestion in me

Shell script, shell script to find the factorial of a given number using th...

shell script to find the factorial of a given number using the for loop

Rational schema, write the rational schema and draw it’s dependency diagram...

write the rational schema and draw it’s dependency diagram. Identify all dependencies.

Communication of request/response - procedural interaction, Explain the Com...

Explain the Communications of Request/Response Communications requirements for message or procedural- based interaction are very similar. Application interaction (client-server

Extension of propositional logic, Extension of propositional logic: Aw...

Extension of propositional logic: Away from proving  theorems directly, and the other main use for rewrite rules is to prepare a statement just for use before we search for th

Describe website features and functionality, This assignment relates to all...

This assignment relates to all of the course objectives but more specifically to your practical understanding and evaluation of the key issues in relation to the development of the

Use of arrays in assembly, An array is referencing using a base array value...

An array is referencing using a base array value as well as an index. To simplify addressing in arrays 8086 has provided two index registers for mathematical computations viz. BP a

Disc shapes and diameters - computer architecture, Disc shapes and diameter...

Disc shapes and diameters:     A Mini-CD is 8 centimeters in diameter. The digital data on a CD start at the center of the disc and proceeds toward the edge, whi

Cisc approach - cisc architecture, CISC Approach - CISC architecture: ...

CISC Approach - CISC architecture: The main goal of CISC architecture is to finish a task in as few lines of assembly as possible as. This is gain by building processor hardwa

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