Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

See your most used shell commands (See related posts)

Found here.

history | awk '{print $2}' | awk 'BEGIN {FS="|"}{print $1}' | sort | uniq -c | sort -n | tail | sort -nr

Comments on this post

Minimiscience posts on Jul 04, 2007 at 22:27
For the last three commands, couldn't you use
sort -nr | head
instead of
sort -n | tail | sort -nr
?

You need to create an account or log in to post comments to this site.


Click here to browse all 5137 code snippets

Related Posts