Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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 www www wwwww fl contains: astar:4 bzip:12 astar:4 cbmp:54 astar:4 cbmp:52 bzip:16 wwwwwwwwwwwww WAY 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. c. 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 dirl, 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

Step: 3

blur-text-image

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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

More Books

Students also viewed these Databases questions