- 论坛徽章:
- 0
|
file .log
2011-09-18 00:00:01,102
2011-09-18 00:00:01,397
2011-09-18 00:00:01,452
2011-09-18 00:00:01,970
2011-09-18 00:00:02,036
2011-09-18 00:00:02,289
2011-09-18 00:00:02,344
2011-09-18 00:00:02,538
2011-09-18 00:00:02,591
2011-09-18 00:00:02,977
2011-09-18 00:00:02,997
2011-09-18 00:00:03,072
2011-09-18 00:00:03,168
2011-09-18 00:00:03,200
2011-09-18 00:00:03,270
2011-09-18 00:00:03,348
2011-09-18 00:00:03,489
2011-09-18 00:00:03,535
2011-09-18 00:00:03,816
2011-09-18 00:00:03,841
2011-09-18 00:00:04,016
2011-09-18 00:00:04,109
2011-09-18 00:00:04,462
2011-09-18 00:00:04,679
2011-09-18 00:00:04,942
2011-09-18 00:00:04,969
2011-09-18 00:00:05,088
2011-09-18 00:00:05,543
2011-09-18 00:00:05,643
2011-09-18 00:00:05,653
2011-09-18 00:00:05,972
2011-09-18 00:00:05,993
2011-09-18 00:00:06,162
2011-09-18 00:00:06,206
2011-09-18 00:00:06,401
2011-09-18 00:00:06,418
2011-09-18 00:00:06,616
2011-09-18 00:00:06,990
2011-09-18 00:00:07,143
2011-09-18 00:00:07,172
2011-09-18 00:00:07,177
比如截出2011-09-18 00:00:04到2011-09-18 00:00:07之间的
sed -n "/2011-09-18 00:00:04/,/2011-09-18 00:00:07/p" file
开始时间是正确的,结束时间是2011-09-18 00:00:07,143就不对了,需要得到2011-09-18 00:00:07,177 |
|