Files
misc/shell_scripts/most_used_commands

23 lines
1.1 KiB
Plaintext
Raw Permalink Normal View History

2011-07-14 02:01:00 +02:00
#! /usr/bin/env bash
2011-07-12 23:26:49 +02:00
AVOID="con\|utopiah@benetou.fr"
# TODO
2011-07-17 23:49:38 +02:00
# invert from goal
# http://fabien.benetou.fr/Cookbook/Cognition#AnalysisOfTheUsageHistoriesOfTools
# consider similar usage for more than bash
# find ~ -name "*history*"
# ~/.vimperator/info/default/history-command (specific JSON format)
# ~/.newsbeuter/history.cmdline
# code repository per programming language (PHP, Processing, JavaScript, ... and bash too!)
2011-07-17 23:33:11 +02:00
# http://fabien.benetou.fr/Tools/Mercurial#PotentialExtensions
# http://fabien.benetou.fr/Cookbook/Cognition#LearningNewLanguage
# see also logs_own_vocabulary
2011-07-14 08:29:25 +02:00
echo consider also http://fabien.benetou.fr/Tools/ and to do exercises
# warning, do not miss the environment e.g. http://mywiki.wooledge.org/BashGuide/
2011-07-12 23:26:49 +02:00
cat ~/.bash_history | sed "s/ /\n/g" | grep "^[[:alpha:]]" | sort | uniq -c | grep -v $AVOID | sort -n | tail | sed "s, \([a-zA-Z].*\), \1\t( http://unixhelp.ed.ac.uk/CGI/man-cgi?\1 ) ,"
# simpler version for just the first word, which is bad for commands like sort which never appear first
#cat ~/.bash_history | sed "s/ .*//" | sort | uniq -c | sort -n | tail