Skip to content

Instantly share code, notes, and snippets.

@mcnemesis
Created December 28, 2012 18:55
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save mcnemesis/4400782 to your computer and use it in GitHub Desktop.
Save mcnemesis/4400782 to your computer and use it in GitHub Desktop.
A Bash One-liner to visualize one's command-usage based on frequencies in one's Bash History.
history | awk '{ print $2}' | sort | uniq -c | sort -n | tail -n 30 | sed -n '{s/^[ \t]*//};p' | gnuplot -p -e 'set xtics rotate out;set style data histogram;set style fill solid 1.0 border -1;plot "-" u 1:xtic(2) notitle'
@mcnemesis
Copy link
Author

U need to have the gnuplot command (on my system - Suse 12.2, it's available in the gnuplot package).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment