Guest User

Untitled

a guest
Jun 22nd, 2012
37
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. Shell Script needed - I have to collect time stamps from appserver logs
  2. perl -MTime::Local -ne '
  3. ($ts, $y, $m, $d, $H, $M, $S, $frac) =
  4. /((d{4})-(dd)-(dd) (dd):(dd):(dd).(d+))/;
  5. $time = timelocal($S, $M, $H, $d, $m-1, $y-1900) + "0.$frac";
  6. print $ts, ",", $time, "n";
  7. ' log.file > output.file
  8.  
  9. 2011-04-12 06:49:02.874,1302605342.874
Advertisement
Add Comment
Please, Sign In to add comment