Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write a script that checks each minute and reports on who logs in and who logs out. You can follow the steps below (not the

image text in transcribed

Write a script that checks each minute and reports on who logs in and who logs out. You can follow the steps below (not the only way): 1. Using the commands who and cut, extract the list of usernames currently logged in the system 2. To check after a minute, the sleep command can be used: sleep 60 3. Get the new list of users logged in after a minute 4. For each user in the first list, check if he is in the second list using if and grep. You can dump the output of grep to /devull when using it in the as a test for the if statement If the user is not in the second list, print that the user has logged out a. b. 5. For each user in the second list, a. If he is in the first list, print that the user has logged in 6. 7. Rename the second list as the first list Repeat the process from step 2) Write a script that checks each minute and reports on who logs in and who logs out. You can follow the steps below (not the only way): 1. Using the commands who and cut, extract the list of usernames currently logged in the system 2. To check after a minute, the sleep command can be used: sleep 60 3. Get the new list of users logged in after a minute 4. For each user in the first list, check if he is in the second list using if and grep. You can dump the output of grep to /devull when using it in the as a test for the if statement If the user is not in the second list, print that the user has logged out a. b. 5. For each user in the second list, a. If he is in the first list, print that the user has logged in 6. 7. Rename the second list as the first list Repeat the process from step 2)

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_2

Step: 3

blur-text-image_3

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

Genetic Databases

Authors: Martin J. Bishop

1st Edition

0121016250, 978-0121016258

More Books

Students also viewed these Databases questions

Question

4. Describe the role of narratives in constructing history.

Answered: 1 week ago