subject

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 /dev/null 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)

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 23.06.2019 11:00
This chapter lists many ways in which becoming computer literate is beneficial. think about what your life will be like once you’re started in your career. what areas of computing will be most important for you to understand? how would an understanding of computer hardware and software you in working from home, working with groups in other countries and contributing your talents.
Answers: 1
question
Computers and Technology, 23.06.2019 12:30
What is the difference between the internet and the world wide web?
Answers: 1
question
Computers and Technology, 23.06.2019 14:00
How are stop motion special effects in animated films created
Answers: 1
question
Computers and Technology, 24.06.2019 22:30
What are the 4 basic items that are traded throughout the world?
Answers: 1
You know the right answer?
Write a script that checks each minute and reports on who logs in and who logs out. you can follow t...
Questions
question
Mathematics, 01.09.2021 15:10
question
Mathematics, 01.09.2021 15:10
Questions on the website: 13722362