sort at jobs chronogically

atq |sort -k 6n -k 3M -k 4n -k 5 -k 7 -k 1
couldn't stand previous unsortability of at jobs list
Sample Output
3674	Fri May  4 08:11:00 2012 m master
3669	Fri May  4 08:31:00 2012 t master
3664	Fri May  4 08:48:00 2012 s master
3626	Fri May  4 16:27:00 2012 S master
3634	Fri May  4 18:09:00 2012 S master
3636	Fri May  4 18:19:00 2012 S master
3639	Fri May  4 18:24:00 2012 S master
3649	Fri May  4 20:39:00 2012 S master
3718	Sat May  5 15:48:00 2012 S master
3720	Sat May  5 18:00:00 2012 S master
3724	Sat May  5 18:25:00 2012 S master
3727	Sat May  5 18:25:00 2012 S master
3728	Sat May  5 18:37:00 2012 S master
3742	Sat May  5 22:26:00 2012 S master
3786	Sun May  6 15:32:00 2012 S master
3788	Sun May  6 15:32:00 2012 S master
3790	Sun May  6 15:33:00 2012 S master
3792	Sun May  6 15:33:00 2012 S master
3796	Sun May  6 16:09:00 2012 S master
3655	Mon May  7 07:04:00 2012 s master
3670	Mon May  7 08:11:00 2012 m master

0
By: klepsydra
2012-05-03 23:15:08

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: