me three

myk@myk:~$ uname -a
Linux myk 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC 2008 i686 GNU/Linux
myk@myk:~$ history|awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head
115 cvs
61 cd
50 ls
33 safari
31 komodo
28 firefox
23 cp
16 ll
12 zip
12 scp
11 mv


Myk said...

One of these things is not like the others. Note the OS and the number of lines that head prints.

Dan said...

Yeah, I think it's pretty interesting that you have a Linux port of Safari!

Clearly something is wrong with your copy of 'head', it should not print the "mv" line. Did you build your own so it defaults to 11 lines?

Myk said...

No, I used the stock version of "head" that came with my Linux system, although I did install the Apple Power Pack for Linux, which includes improved versions of many GNU utilities.

helloWorld said...


history|awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head
'history' is not recognized as an internal or external command,
operable program or batch file.


crappy windows

Onno Ekker said...

I think it's strange to see so much cvs updates and no vi/emacs

Try cygwin...

OEEkker@oeekker ~:$ uname -a
CYGWIN_NT-5.1 oeekker 1.5.25(0.156/4/2) 2008-06-12 19:34 i686 Cygwin

OEEkker@oeekker ~:$ history|awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head
82 ls
71 cd
24 find
22 zcat
22 ******
20 cygrunsrv
19 grep
17 vi
14 ssh
14 man

Myk said...

Onno: that's because I don't use vi/emacs. I'm a Komodo guy.