From 621963cf1c025e5f4fe0b5ff6390b7d0aff3453c Mon Sep 17 00:00:00 2001 From: Tristan Donkers Date: Fri, 14 Aug 2015 02:59:05 +1000 Subject: [PATCH] Update awk comand for time_string to support pre and post 1.7 log format --- init/msm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init/msm b/init/msm index 8834158..8cfd668 100755 --- a/init/msm +++ b/init/msm @@ -292,7 +292,7 @@ now() { # $1: A server log line # returns: Time in seconds since 1970-01-01 00:00:00 UTC log_line_get_time() { - time_string="$(echo "$1" | awk '{print $1 " " $2}')" + time_string="$(echo "$1" | awk 'BEGIN{FS="[ \][/:]+"}; {print $1 " " $2 ":" $3 ":" $4}')" date -d "$time_string" "+%s" 2> /dev/null }