2008-04-14

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

4 Comments:

Blogger Myk said...

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

5:06 PM  
Blogger 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?

5:07 PM  
Blogger 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.

5:18 PM  
Anonymous helloWorld said...

doh...

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.

C:\>

crappy windows

5:32 PM  

Post a Comment

Links to this post:

Create a Link

<< Home