summary refs log tree commit diff
path: root/syslog-stripdate
blob: 3f1dc945101f044bfc4cb36b88c8dc95d09a625e (plain) (blame)
1
2
3
4
5
6
7
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 -u '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 /'