Write a complete bash script that monitors who logs in and logs out of the current CSELinux machine (e.g., cse01, cse02, etc.) where the script is running. In particular, youwill check the status of who is logged in every 10 seconds and report each user ID thatlogs in or logs out during that time frame. Note that there may be more than one userthat logs in or out duringthis interval. You must include the host name when reportingthe user ID information. In addition, you will install a custom signal handler to trap theSIGINT(i.e.,^C)onetimebeforeyouareabletoterminatethescriptwiththeSIGINT.You will also print out the current date and time and report the number of users loggedin,even if there are no changes (i.e.,no one logged in or out during the interval).
Write a complete bash script that monitors who logs in and logs out of the current CSELinux machine (e.g., cse01, cse02, etc.) where the script is running. In particular, youwill check the status of who is logged in every 10 seconds and report each user ID thatlogs in or logs out during that time frame. Note that there may be more than one userthat logs in or out duringthis interval. You must include the host name when reportingthe user ID information. In addition, you will install a custom signal handler to trap theSIGINT(i.e.,^C)onetimebeforeyouareabletoterminatethescriptwiththeSIGINT.You will also print out the current date and time and report the number of users loggedin,even if there are no changes (i.e.,no one logged in or out during the interval).
HOW TO DO THIS? PLEASE EXPLAIN WITH ANSWER!!


Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images









