The problem statement, all variables and given/known data:
Show all users who are currently logged in, sorted from earliest to latest log in time. The log in time includes the month, day, and time.
Relevant commands, code, scripts, algorithms:
finger, who, sort, pipe, head, tail,
The attempts at a solution (include all code and scripts):
finger | tail -n +2 | sort -n +4 -5
I've also tried
finger | tail -n +2 | sort -M | sort +6 -7
(thinking that maybe column 7 is the time if you count Dec is 5th column, the 9th is 6th (see the output finger below)
Complete Name of School (University), City (State), Country, Name of Professor, and Course Number (Link to Course):
De Anza College, Cupertino (California), US, Clare Nguyen, CIS 18A (It won't let me post link because I don't have 5 posts yet)
It's supposed to be just one single line command. We can use pipe. Can you think more simple? haha. I'm sorry but this is just an introductory class to Unix.
Let me explain the problem with using finger, since finger is showing abbreviated month, we cannot apply a numeric or alphabetical order sort on the date. This is the reason why I suggested to convert the date to epoch and perform the sort.