Answered step by step
Verified Expert Solution
Link Copied!

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:
#!/bin/bash
1. Create a directory with the name lab5 in your home directory.
2. Use the file /home/david/lab5/lab5.scr as a template to create a menu interface for simple commands.
Copy the file /home/david/lab5/lab5.scr into your lab5 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 2020 and December 2019
B. Execute the ping command four times to test the Network Connection for the hostname vbitbus.tcc.edu.
Bonus +10:
Determine if the Secure Shell LISTENER is running.
C. Execute the command that will display information on disk usage for the directory /home/david/lab5.
Use the option that displays SUMMARY information only.
D. Execute the command that displays the amount of available/free disk space for all mounted filesystems.
Use the option that displays sizes in human readable format. Display only the first 15 lines of output.
3. Modify the .profile file in your home directory to include the following:
Declare the terminal type keyword shell variable TERM with the value vt100. 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.
4. Execute the .profile using the dot command. Execute the following commands and redirect output to the
file lab5.out1 located in your lab5 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.
5. Run the lab5.scr script multiple times to execute all menu interface choices. Use the tee command to
redirect output to the file lab5.out in your lab5 directory.
(Example: ../lab5.scr | tee -a lab5.out)
include screenshots please

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

Introduction To Constraint Databases

Authors: Peter Revesz

1st Edition

1441931554, 978-1441931559

More Books

Students also viewed these Databases questions