munging .bash_history

Jose Alves de Castro <[email protected]>
Newsgroups gmane.comp.lang.perl.fun
Message-ID <[email protected]>
Try to get some statistics about used commands, usual options /
parameters...

something like:

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

or even:

cat .bash_history|perl -ne '/^(?:\.(0,2)\/)?[a-z0-9]+/&&$_{$&}++&&++$c}for(sort{$_{$a}<=>$_{$b}}keys%_){print sprintf"$_\t$_{$_}\t%2.2f%\n",($_{$_}*100/$c)'

or whatever you came up with :-)


Happy hacking :-)

jac

-- 
José Alves de Castro <[email protected]>
Telbit - Tecnologias de Informação
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.