Never been to CodeSnippets 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 (or not, you can keep them private!)

Shell history command count (See related posts)

Counts how many times each command appears in your shell history.

bash:

history | awk '{print $2}' | sort | uniq -c | sort -rn | head


zsh:

history -1000 | awk '{print $2}' | sort | uniq -c | sort -rn | head

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