DZone 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

Snippets has posted 5883 posts at DZone. View Full User Profile

See Your Most Used Shell Commands

  • submit to reddit
        Found <a href="">here.</a>

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


Snippets Manager replied on Wed, 2007/07/04 - 9:08pm

For the last three commands, couldn't you use sort -nr | head instead of sort -n | tail | sort -nr?