Answered step by step
Verified Expert Solution
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
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 nameStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started