Topics

Archives

Handy References


« | Main | »

Cool one-line report…

By Matt | July 13, 2009

sudo grep “GET https://www.miroguide.com/ HTTP/1.1″ /var/log/squid/access.log  | grep “\”Miro/” | sed ‘s/^.*”-” “//g’ | sed ‘s/ .*$//g’ | grep Miro | sort | uniq -c

The sort | uniq -c being the good part.  It parsed 625,000 entries in the log to make this useful (to the person who asked for it) report:

      2 Miro/0.9.8
      7 Miro/0.9.8.1
      8 Miro/0.9.9
     86 Miro/0.9.9.1
     42 Miro/0.9.9.1a
     12 Miro/0.9.9.9
     18 Miro/0.9.9.9.1
    383 Miro/1.0
     10 Miro/1.0-svn
    362 Miro/1.1
      1 Miro/1.1.1
    255 Miro/1.1.2
     56 Miro/1.2
     92 Miro/1.2.1
    119 Miro/1.2.2
    600 Miro/1.2.3
    415 Miro/1.2.4
      4 Miro/1.2.5
    217 Miro/1.2.6
    825 Miro/1.2.7
   1784 Miro/1.2.8
     66 Miro/1.2-svn
    237 Miro/2.0
   1119 Miro/2.0.1
    292 Miro/2.0.2
   3772 Miro/2.0.3
   7171 Miro/2.0.4
  32008 Miro/2.0.5
     33 Miro/2.0-svn
    119 Miro/2.5-rc1
    125 Miro/2.5-svn

The somewhat frightening part is that line took all of 90 seconds for me to whip out…

Topics: Linux | No Comments »

Comments

You must be logged in to post a comment.