Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Challenge Lab: Each Challenge Lab is worth 2 0 points. 1 ) Create a script called week 9 . sh with a text editor. 2
Challenge Lab: Each Challenge Lab is worth points.
Create a script called weeksh with a text editor.
You MUST make the script file weeksh executable.
Your script MUST use a #binbash or #binsh as the first line of the script to
determine what shell is to be used to execute the script.
NOTE: If your script does NOT execute, check your PATH environment variable. It
should have been updated in Week Lab of the semester.
Fully comment the script where needed.
Your output file will be called weekchout.
You MUST have a function in the weeksh script to display your student header
information in the weekchout file using and to redirect the output and
information shown below. Example:
Brent Fulton
Username: student name show using one of the methods learned
Date: current date and time using date
Assignment: Week Challenge Lab
Make sure the output is neat and use extra echo commands to insert lines into the
output for easier reading.
Use blank lines in the script for easier reading in the script as well.
The script should perform, complete, and show the following information:
a Function in script should show the student header information as discussed above
in the weekchout file.
b Use the echo commands below to create a visual separator in the weekchout
file.
echo weekchout
echo weekchout
c Your script must clear the screen and ask for a directory name to create. This will
NOT appear in the weekchout file, only on the screen Read in the response
and use that variable with the mkdir command for the following item.
d Create a directory using the directory name from above.
e Use the cd command to change to the directory name from above.
f Use the touch command to create files called file file and file
g Change the permissions on the files as follows:
file
file
file
h Set the Sticky Bit on file
i List the directory files in reverse alphabetical order AND use the long listing
format to show all file details and permissions. This MUST be in your
weekchout file.
j Use the cd command to change back to your home directory.
k Remove the directory and all files that were created using the variable that
contains the directory name from above.
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