diff options
Diffstat (limited to 'syslog-stripdate')
-rwxr-xr-x | syslog-stripdate | 8 |
1 files changed, 8 insertions, 0 deletions
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 /' |