Skip to content

Instantly share code, notes, and snippets.

@geekodour
Forked from mcnemesis/history_viz.sh
Created December 12, 2016 16:22
Show Gist options
  • Save geekodour/f312fefcaaba68934251595d3df0456d to your computer and use it in GitHub Desktop.
Save geekodour/f312fefcaaba68934251595d3df0456d 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'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment