Hey,
Im trying to format the last command to tell me just the user names, logins, and the time that they were logged in. So far I got the users logins using a loop that counts the amount of times a user logged in but im not sure how to start the time array. The time im trying to use is the last field when the last command is entered. Any help would be appreciated.
Here is some code I have atm:
BEGIN{print "USER" "\t" "LOGINS" "\t" "TIME"}
{count[$1]++}
END {
for (name in count)
print name "\t " count[name]
}
Thanks for reading.