[Solved] CS213 Assignment 11-Awk Programming

$25

File Name: CS213_Assignment_11_Awk_Programming.zip
File Size: 329.7 KB

SKU: [Solved] CS213 Assignment 11-Awk Programming Category: Tag:
5/5 - (1 vote)

5/5 – (1 vote)

We have five questions in this Lab 11.

– Question 1: Write an awk program using arrays which takes an input file having some numbers in each record. Assume that each record has same number of fields. Then write rows as columns and columns as rows.

For example :

input : 123 456 789

Output : 147 256 369

– Question 2:

Write an awk script to do matrix multiplication.It takes as input two matrices from two files matrix1 and matrix2 and gives output in matrix3, if the multiplication is possible otherwise states that it is not possible giving out reasons.

– Question 3:

Write an AWK script and not a shell script which interactively asks the user to enter a number and outputs it only once in Roman numerals, if the number is within 1 and 10.

Given below is an expected behaviour:

on input : 4 oninput:10 on input : 4 on input : q

Output : IVOutput:XOutput : Given previously. Program terminates.

Hint: Use array, split, deleting an array element

– Question 4:

Write an AWK script and not a shell script which outputs values of PATH environment variables.

– Question 5:

Write an AWK script which reads text file and changes each line to also write the number of characters in each field.It should not count punctuation marks.

For example the input line"For instance, if you match"
is changed to the following:"For instance, if you match 3 8 2 3 5"

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] CS213 Assignment 11-Awk Programming[Solved] CS213 Assignment 11-Awk Programming
$25