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, 22.06.2019 17:40
Write a modular program (no classes yet, just from what you learned last year), that allows two players to play a game of tic-tac-toe. use a two-dimensional char array with 3 rows and 3 columns as the game board. each element of the array should be initialized with an asterisk (*). the program should display the initial board configuration and then start a loop that does the following: allow player 1 to select a location on the board for an x by entering a row and column number. then redisplay the board with an x replacing the * in the chosen location. if there is no winner yet and the board is not yet full, allow player 2 to select a location on the board for an o by entering a row and column number. then redisplay the board with an o replacing the * in the chosen location. the loop should continue until a player has won or a tie has occurred, then display a message indicating who won, or reporting that a tie occurred. player 1 wins when there are three xs in a row, a column, or a diagonal on the game board. player 2 wins when there are three ox in a row, a column, or a diagonal on the game board. a tie occurs when all of the locations on the board are full, but there is no winner. input validation: only allow legal moves to be entered. the row must be 1, 2, or 3. the column must be 1, 2 3. the (row, column) position entered must currently be empty (i.e., still have an asterisk in it).
Answers: 1
question
Computers and Technology, 23.06.2019 04:31
Q14 what is most important for you to choose before you build a network? a. private network b. nos c. network media d. network protocol e. directory service
Answers: 1
question
Computers and Technology, 23.06.2019 13:00
In excel - calculate the actual increase/decrease from first quarter to the second quarter then subtract subtract first quarter value from second quarter total then divide result by first quarter value
Answers: 1
question
Computers and Technology, 23.06.2019 15:00
To check whether your writing is clear , you can
Answers: 2
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, 12.07.2019 15:50
Questions on the website: 13722362