0
start_time=22:15:14 (second line)
end_time=01:05:15 ( last but one)

我想要这些时间之间的所有这些记录。

Jan 3 22:14:14 Program: p1: PID=1681586: Thread 9 - Record type=1 (p1a): 0 processed OK, 0 failed
Jan 3 22:15:14 Program: p1: PID=1681586: Thread 9 - Record type=2 (p1b): 0 processed OK, 0 failed
Jan 3 22:16:14 Program: p1: PID=1681586: Thread 9 - Record type=3 (p1c): 2 processed OK, 4 failed
Jan 3 22:17:14 Program: p1: PID=1681586: Thread 9 - Record type=4 (p1d): 0 processed OK, 0 failed
Jan 3 22:17:14 Program: p1: PID=1664884: Thread 5 - Record type=1 (p1a): 0 processed OK, 0 failed
Jan 3 22:17:14 Program: p1: PID=1664884: Thread 5 - Record type=2 (p1b): 0 processed OK, 0 failed
Jan 3 22:17:14 Program: p1: PID=1664884: Thread 5 - Record type=3 (p1c): 3 processed OK, 5 failed
Jan 3 22:17:14 Program: p1: PID=1664884: Thread 5 - Record type=4 (p1d): 0 processed OK, 0 failed
Jan 3 22:17:15 Program: p1: PID=1663618: Thread 14 - Record type=1 (p1a): 0 processed OK, 0 failed
Jan 3 22:17:15 Program: p1: PID=1663618: Thread 14 - Record type=2 (p1b): 0 processed OK, 0 failed
Jan 4 01:17:15 Program: p1: PID=1663618: Thread 14 - Record type=2 (p1b): 0 processed OK, 0 failed
Jan 4 01:17:15 Program: p1: PID=1663618: Thread 14 - Record type=2 (p1b): 0 processed OK, 0 failed
Jan 4 01:17:15 Program: p1: PID=1663618: Thread 14 - Record type=2 (p1b): 0 processed OK, 0 failed
Jan 4 01:05:15 Program: p1: PID=1663618: Thread 14 - Record type=2 (p1b): 0 processed OK, 0 failed
Jan 4 01:17:15 Program: p1: PID=1663618: Thread 14 - Record type=2 (p1b): 0 processed OK, 0 failed
4

1 回答 1

1
sed '/start_time=hh:mm:ss/,/end_time=hh:mm:ss/' your_log_file
于 2013-01-02T06:18:46.910 回答