Skip to content

Commit

Permalink
Fix an output formatting bug in the rewriter script.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaqx0r committed Apr 5, 2015
1 parent dca3339 commit 86e0f63
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions log_rewriter.awk
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ BEGIN{
{
split($1, DATE, "/")
split($2, TIME, ":")
$1 = ""
$2 = ""
t = mktime(DATE[1] " " DATE[2] " " DATE[3] " " TIME[1] " " TIME[2] " " TIME[3])
if (delta == "") {
delta = now - t
}
print strftime(format, t + delta) $0
out = strftime(format, t + delta)
for (i = 3; i <= NF; i++) {
out = out OFS $i
}
print out
}

0 comments on commit 86e0f63

Please sign in to comment.