in reply to Convert Epoch times in Logfile

Expanding your code ..
perl -MPOSIX -F, -lane 'print join ("," ,$F[0],strftime( "%F %T", loca +ltime $F[1]),@F[2..$#F],$ARGV),"\n"' Your-Log-file.log

             I hope life isn't a big joke, because I don't get it.
                   -SNL

Replies are listed 'Best First'.
Re^2: Convert Epoch times in Logfile
by stevbutt (Novice) on Jun 08, 2012 at 01:07 UTC

    That works perfectly, thank you so much ! Steve

Re^2: Convert Epoch times in Logfile
by jwkrahn (Abbot) on Jun 08, 2012 at 01:10 UTC
    perl -MPOSIX -F, -lane 'print join ("," ,$F[0],strftime( "%F %T", loca +ltime $F[1]),@F[2..$#F],$ARGV),"\n"' Your-Log-file.log
    perl -MPOSIX -pe's/^([^,]+,)(\d+)/ $1 . strftime "%F %T", localtime $2 + /e; s/$/,$ARGV/' Your-Log-file.log