From b01b3a1c2e6e762f6114d14e2a500a778a7b6a1d Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Sat, 19 Jul 2014 12:41:06 +0200 Subject: add syslog-stripdate --- syslog-stripdate | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 syslog-stripdate (limited to 'syslog-stripdate') diff --git a/syslog-stripdate b/syslog-stripdate new file mode 100755 index 0000000..cb84619 --- /dev/null +++ b/syslog-stripdate @@ -0,0 +1,8 @@ +#!/bin/sh +# syslog-stripdate - remove superfluous timestamp from socklog->svlogd +# +# 2014-07-19T10:20:24.52892 user.notice: Jul 19 12:20:24 xbps-install: ... +# turns to +# 2014-07-19T10:20:24.52892 user.notice: xbps-install: ... + +sed 's/^\([0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]T[0-9][0-9]:[0-9][0-9]:[0-9][0-9].[0-9][0-9][0-9][0-9][0-9] [a-z]*\.[a-z]*:\) ... [0-9 ][0-9] [0-9][0-9]:[0-9][0-9]:[0-9][0-9] /\1 /' -- cgit 1.4.1