Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Purpose: The purpose of this assignment is to use concepts / features of the Bourne Shell. * The first line of your script must contain
Purpose: The purpose of this assignment is to use concepts features of the Bourne Shell.
The first line of your script must contain the following:
#binbash
Create a directory with the name lab in your home directory.
Use the file homedavidlablabscr as a template to create a menu interface for simple commands.
Copy the file homedavidlablabscr into your lab directory and make appropriate changes to the script.
The menu interface should contain the following choices.
A Execute the command that will display a calendar for the year and December
B Execute the ping command four times to test the Network Connection for the hostname vbitbus.tccedu.
Bonus :
Determine if the Secure Shell LISTENER is running.
C Execute the command that will display information on disk usage for the directory homedavidlab
Use the option that displays SUMMARY information only.
D Execute the command that displays the amount of availablefree disk space for all mounted filesystems.
Use the option that displays sizes in human readable format. Display only the first lines of output.
Modify the profile file in your home directory to include the following:
Declare the terminal type keyword shell variable TERM with the value vt Make the variable global.
Create a function with the name psuser that will display the date and will list all processes on the
process status list for a specific user. The user must be passed to the function as a command line
argument when the function is executed.
Create a function with the name whoson that will display the date and a sorted list of users
logged into the system.
Execute the profile using the dot command. Execute the following commands and redirect output to the
file labout located in your lab directory.
a Display the value of the term type variable.
b Execute the psuser function providing your username as a command line argument.
c Execute the whoson function.
Run the labscr script multiple times to execute all menu interface choices. Use the tee command to
redirect output to the file labout in your lab directory.
Example: labscr tee a labout
include screenshots please
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