Answered step by step
Verified Expert Solution
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 labscr that will run various UNIX
commands and will redirect the output of the commands to
the file labout and labout
Steps listed below must be part of the labscr script.
Any output for steps should be redirected to labout.
Any output for steps should be redirected to labout
All files must be contained within your lab directory.
Your script must contain comments with your name, course
number and your user id
Steps for the Assignment:
Create the directory lab and labtemp in your home directory.
Copy the labreadme file from homedavid to your lab directory.
List all files in the homedavidlab directory that begin with
the filename "names".
Copy all files in the homedavidlab directory that have the file
extension save to your labtemp directory. Display the list of files
copied to your labtemp directory Bonus
Sort the file homedavidlabcolors in reverse order.
Display the active processes on the process status
list with only your user id number UID or your user
name userXX
Display the first lines of the file homedavidlabpasswd
Display the last lines of the file homedavidlabpasswd
file.
Display a sorted list of users logged into the system.
Sort the output by IP address.
Display a recursive long list of all files in your lab directory.
Note: The labscr script does not have to be moved to the lab directory
as part of the labscr script. Just move the script file into your lab
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
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