Bash history meme
history | awk ‘{a[$2]++ } END{for(i in a){print a[i] ” ” i}}’|sort -rn|head
My workstation
123 ssh
58 su
34 sudo
30 apt-cache
29 cd
22 sensors
13 ls
11 ping
9 host
8 scp
andy@bloodymary:~$
This server
228 grep
68 tail
35 mailq
23 host
22 cd
14 mutt
10 zgrep
10 whois
10 mc
6 vi


on May 23rd, 2008 at 11:37 pm
Uhm …
nicola@beagle10:~$ history | awk ‘{a[$2]++ } END{for(i in a){print a[i] ” ” i}}’|sort -rn|head
-bash: syntax error near unexpected token `(’
picchè ?
on March 6th, 2010 at 9:52 am
I am a bit late on this answer …
You have to replace the simple and double quotes before to paste the command to your term and it will work