‘History’cal Research


$ history|awk '{a[$2]++ } END{for(i in a){print a[i] " " i}}'|sort -rn|head
103 ls
61 cd
51 vi
48 cat
25 ssh
19 zgrep
13 man
12 ./doit
11 sqlplus
11 linefix

Published in: on May 1, 2008 at 4:27 pm


The URI to TrackBack this entry is: http://blog.une.edu.au/dsymons2/2008/05/01/historycal-research/trackback/

RSS feed for comments on this post.

2 Comments Leave a comment.

  1. on May 6, 2008 at 6:16 am jburne5 Said:

    Nice idea. The single and double quotes get changed to opening and closing quotes by WordPress so you have to change them back for the script to work.

    I would prefer to use “less” rather than “head” as the last command so you can go as far down the sorted list as you want to.

    What does your script “doit” do?

  2. on May 6, 2008 at 9:22 am David Symons Said:

    Thanks Jon,

    I’ve fixed the quotes by editing the post and changing them to the equivalent HTML codes (' and ").

    doit is a little script I’ve written to help with moving content off the old webserver. It takes a pagename and:

    - greps the httpd.conf to reveal any reverse proxying of that page;

    - opens the page from the old and new webservers for a visual comparison; and

    - wget’s the content from the old and new servers then diff’s them - as another comparison.

    BTW, the use of zgrep is related - I’ve been searching through a lot of apache logs!

    Oh yes, and the idea isn’t mine I got it from http://bethesignal.org/blog/2008/04/10/shell-history-stats/ :-) .

Leave a Comment

You must be logged in to post a comment.