Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help in linux Q.1. (40 points) File f1 contains the following information. Write an awk script that reads file f1, calculates the toal values

Need help in linux

image text in transcribed

Q.1. (40 points) File f1 contains the following information. Write an awk script that reads file f1, calculates the toal values for astar, bzip and cbmp separately, and prints them. Ex: output: astar 12 bzip 28 cbmp 106 fl contains: astar: 4 bzip:12 astar: 4 cbmp:54 astar: 4 cbmp:52 bzip:16 Q.2.(60 points) Given the following directory structure. Write a shell script for the following questions. / -> tmp -> etc --> home -> Desktop -> diri ->a.txt -> b.sh -> dir2 --> c.txt -> Downloads -> dl.pdf -> tl.tar -> Usr a. Your current diractory is home. Change your current directory as dir2. b. Create a directory under dir2 named myDir. Find and display the number of occurrences of the word "cse in a.txt. . d. For each command line argument do the following: if the argument is a file name under diri, move it under myDir and change its permissions follows: give write and execute rights to the user, remove execute right from the group and remove write right from others otherwise display the message "wrong file name

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions

Question

=+How should it be delivered?

Answered: 1 week ago

Question

=+4 How does one acquire a global mindset?

Answered: 1 week ago