- 论坛徽章:
- 307
|
- perl -pe 'BEGIN{$r=qr/(\d+(?:[:-]\d+)+)/}{s/"$r\h$r"/{"\$date":"${1}T${2}Z"}/}' f
复制代码
[{"a":"10.100.121.187","b":"liux18","c":{"$date":"2015-11-02T00:00:36Z"},"d":"GET /1jsp"},
{"a":"10.100.91.88","b":"liyunguo","c":{"$date":"2012-01-01T00:01:19Z"},"d":"GET /p2.jsp"},
{"a":"10.208.26.203","b":"xuaiping1","c":{"$date":"2010-12-01T00:01:31Z"},"d":"GET /in.jsp"},
{"a":"10.100.91.88","b":"liyunguo","c":{"$date":"2013-12-31T00:01:32Z"},"d":"GET /n.jsp"},
{"a":"10.100.59.3","b":"liushubin2","c":{"$date":"2014-12-14T00:02:46Z"},"d":"GET /2"},
{"a":"10.100.59.3","b":"liushubin2","c":{"$date":"2011-12-12T00:11:46Z"},"d":"GET /1"}]
|
|