If I run this on OS X:
last -10 | awk '{print $1}'
I get:
chop
chop
chop
chrihopk
reboot
shutdown
chop
chop
chop
chrihopk
How do I use sed or awk to obtain the most frequent user 'chop'?
ADDITIONAL EDIT TO QUESTION:
Our local admin account interferes with the results (username: support) and often we have a new starter on a client box.
How could I modify
last -1
to omit the following and return the last valid username:
support
reboot
shutdown
Thanks