log sampling

A little Perl snippet for sampling a log file (or whatever):

grep something myfile | perl -n -e ‘print if $. % 12 == 1;’

One Comment

  1. Edward
    Posted September 5, 2012 at 1:20 pm | Permalink

    Apparently it works the same if I s/perl/ruby/

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*