Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Purpose: The purpose of this assignment is to write a shell script with the name lab 3 . scr that will run various UNIX commands

Purpose: The purpose of this assignment is to write a shell
script with the name lab3.scr that will run various UNIX
commands and will redirect the output of the commands to
the file lab3.out and lab3.out1.
* Steps 1-09 listed below must be part of the lab3.scr script.
* Any output for steps 1-6 should be redirected to lab3.out.
* Any output for steps 7-09 should be redirected to lab3.out1.
* All files must be contained within your lab3 directory.
* Your script must contain comments with your name, course
number and your user id.
Steps for the Assignment:
1. Create the directory lab3 and lab3/temp in your home directory.
2. Copy the lab3.readme file from /home/david to your lab3 directory.
3. List all files in the /home/david/lab3 directory that begin with
the filename "names".
4. Copy all files in the /home/david/lab3 directory that have the file
extension .save to your lab3/temp directory. Display the list of files
copied to your lab3/temp directory [Bonus +10]
5. Sort the file /home/david/lab3/colors in reverse order.
6. Display the active processes on the process status
list with only your user id number (UID) or your user
name (user1XX).
7. Display the first 15 lines of the file /home/david/lab3/passwd.
Display the last 7 lines of the file /home/david/lab3/passwd
file.
8. Display a sorted list of users logged into the system.
Sort the output by IP address.
9. Display a recursive long list of all files in your lab3 directory.
Note: The lab3.scr script does not have to be moved to the lab3 directory
as part of the lab3.scr script. Just move the script file into your lab3
directory after your assignment is complete.
I need a detailed solution or screenshot of solution if possible

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

Secrets Of Analytical Leaders Insights From Information Insiders

Authors: Wayne Eckerson

1st Edition

1935504347, 9781935504344

More Books

Students also viewed these Databases questions

Question

2. Do you agree that unions stifle creativity? Why or why not?

Answered: 1 week ago