Converting Squid Timestamps

I found the following perl snippet here to convert a squid log file into one with readable times:


#! /usr/bin/perl -p
s/^\d+\.\d+/localtime $&/e;

It can be used like this:
./timeconvert.pl inputfile.txt > outputfile-withhumantime.txt

Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>