Question: ( 1 4 points ) Assume we have a program named bigbrother, whose output format is as follows: username login _ time (
points Assume we have a program named bigbrother, whose output format is as follows:
username logintime Rightarrow logouttime minuteson
If a user hasn't logged out, the logouttime is set to 'none'. Times are otherwise in hour format. The program resets every day at midnight; if someone logged in at :pm then at :am it would say that they logged in at : and had been on for minute.
Here is some sample output, assuming you've run the command at :pm:
Bart logged on minutes ago, and is still on Homer logged in at :am for three minutes, and later logged in at :am for minutes. Smithers was logged in most of the day in one window, and also opened a second window for just over an hour.
Note that: the program uses groups of spaces, sometimes more, sometimes fewer, so the output is in neat columns. There are no tabs in the output. and the output is sorted by username for everyone who logged on today in the order they logged in
Write shell commands that begin with mid and generate the following output:
a Show the full lines for the five longest login sessions of the day
b Show the full line for all login sessions that began before am
c Show the full line for all login sessions that ended after pm
d Show only the names and login times for all sessions. You may only use a single awk command after the pipe.
e Show only the names and login times for all sessions. You may not use awk in your answer.
f Give the total login time for user carl, counting all login sessions.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
