Question: PLEASE DISPLAY YOUR OUTPUT SCRIPT DESCRIPTION: Write a complete bash script that monitors who logs in and logs out of the current CSE Linux machine

PLEASE DISPLAY YOUR OUTPUT SCRIPT DESCRIPTION: Write a complete bash script that monitors who logs in and logs out of the current CSE Linux machine (e.g., cell01, cell02, etc.) where the script is running. In particular, you will check the status of who is logged in every 10 seconds and report each user ID that logs in or logs out: during that time frame. Note that there may be more than one user that logs in or out during this interval. You must include the host name when reporting the user ID information. In addition, you will install a custom signal handler to trap the SIGINT (i.e., C ) one time before you are able to terminate the script with the SIGINT. You will also print out the current date and time and report the number of users logged in, even if there are no changes (i.e., no one logged in or out during the interval). Please see the SAMPLE OUTPUT for several examples, including the different scenarios that might occur. SAMPLE OUTPUT (user input shown in bold): 5./minor2.sh Wed Feb 13 01:05:25 C3T 2022) initial users logged in > xyz0123 logged in to cello1 > abe0456 logged in to cello1 1 > def0789 logged in to cello1 > mat0299 logged in to cello1 >mn0012 logged in to ce1101 rrsto034 logged in to cello1 >jk10056 logged in to cello1 >uv0078 logged in to ce1101 Wed Feb 13 01:05:25 C3T 2022) \# of users: 8 Wed Feb 13 01:05:35 C3T 2022) \# of users: 8 lied Feb 13 01:05:45 C3T 2022) \# of users: 8 Wed Feb 13 01:05:55 C3T 2022) \# of users: 6 Tled Feb 13 01:06:05 C3T 2022) \# of users: 8> mat0299 logged in to cel101 Wed Feb 13 01:06:15 C3T 2022) \# of users: 9 Wed Feb 13 01:06:25 C3T 2022) \# of users: 9 > mat0299 logged in to cello1 >mnn012 logged out of cello1 lied Feb 13 01:06:35 C3T 2022) \# of users: 9 Wed Feb 13 01:06:45 C3T 2022) \# of users: 9 AC (BIGINT) ignored. enter C 1 more time to terminate program. Wed Feb 13 01:06:52 C3T 2022) f of users: 9 cc
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
