Question: Questions For this lab assignment, you will be responsible for writing a simple Bash script. You will use the knowledge you have gained from completing

 Questions For this lab assignment, you will be responsible for writing

Questions For this lab assignment, you will be responsible for writing a simple Bash script. You will use the knowledge you have gained from completing all the lab assignments in this module, as well as previous modules, to accomplish the following: - Create a variable that contains the name of the person running the script. Require the name to be input on execution. - Create a variable that contains the month, day, and year. - Create a variable that contains the 12-hour clock time. - Create a variable that contains the hostname of the system. - Using an if...else construct, create a variable to determine if the current time is in the morning, afternoon, or evening and store it as a variable. - Create a variable that stores the distribution release name. - Create a variable that stores the number of users in /etc/passwd - Echo the following statement using the variables stored above: "Hello name. Today is date. This script was executed at time in the ampm. The hostname of this machine is hostname. The distribution of this Linux operating system is distribution. There are currently usercount users on this system. These are the current files and directories in /var/log: - Using a for loop, echo the file and directory names in /var/log, separated by newlines. Your code should adhere to the above requirements and output the expected results when executed in a Linux environment. If your code fails to run when executed, does not adhere the above requirements, or does not output the expected results, points will be deducted from the lab assignment grade. I should be able to copy your code below into nearly any Linux shell and have it executed without issue. Example output of the script: Hello inhn. Tndav is Fehruary 20Fh.. 202?. This scrint was executed at 12:2.5:00 in the afternoon. The

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!