Skip to content

Instantly share code, notes, and snippets.

@drush
Last active January 14, 2020 16:51
Show Gist options
  • Save drush/26e04fb09168d21fbf72578037cd2d98 to your computer and use it in GitHub Desktop.
Save drush/26e04fb09168d21fbf72578037cd2d98 to your computer and use it in GitHub Desktop.
Find the Command Line Utilities You Use the Most
history | awk '{CMD[$2]++;count++;}END { for (a in CMD)print CMD[a] " " CMD[a]/count*100 "% " a;}' | grep -v "./" | column -c3 -s " " -t | sort -nr | nl | head -n20
@drush
Copy link
Author

drush commented Jan 13, 2020

Sample output:
image

@omab
Copy link

omab commented Jan 14, 2020

Linux version of the command:

history | awk '{CMD[$4]++;count++;} END { for (a in CMD) print CMD[a] " " CMD[a]/count*100 "% " a;}' | column -c3 -s " " -t | sort -nr | nl | head -n20

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