Original:

Jan 23 2011 10:42 SOMETHING 2007.12.20.avi
Jun 26 2009 SOMETHING 2009.06.25.avi
Feb 12 2010 SOMETHING 2010.02.11.avi
Jan 29 2011 09:17 SOMETHING 2011.01.27.avi
Feb 11 2011 20:06 SOMETHING 2011.02.10.avi
Feb 27 2011 23:05 SOMETHING 2011.02.24.avi

Output:

Feb 27 2011 23:05 SOMETHING 2011.02.24.avi
Feb 11 2011 20:06 SOMETHING 2011.02.10.avi
Jan 29 2011 09:17 SOMETHING 2011.01.27.avi
Jan 23 2011 10:42 SOMETHING 2007.12.20.avi
Feb 12 2010 SOMETHING 2010.02.11.avi
Jun 26 2009 SOMETHING 2009.06.25.avi

How could I get the output where the newest file is at the top?

link|improve this question

62% accept rate
Possible duplicate of the same user's other question. – Daniel Beck Feb 28 '11 at 19:47
+ off topic, openwrt runs on what can be considered to be an electronic device. – Daniel Beck Feb 28 '11 at 19:48
feedback

closed as not a real question by Daniel Beck, CarlF, Sathya Mar 1 '11 at 9:01

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. See the FAQ for guidance on how to improve it.

1 Answer

I found a similar example here. Sort can work on multiple keys.

sort --key=3nr --key=1Mr --key-2nr <input_file

The question was also answered on stackexchange here.

link|improve this answer
feedback

Not the answer you're looking for? Browse other questions tagged or ask your own question.