- Jan 21, 2005
- 17,722
- 6
- 81
Given a snippet of my log file:
I would like to only keep lines that begin with a date.
I create the following egrep command, but it doesn't work right.
My log there was to grab anything with the date...but it doesn't work...any tips?
Code:
SYSLCJ1=/tmp/DEVL/tigsmd31.log.DEVL.x6791.tibmd31.s14602
TMPLCJ1=/tmp/tigsmd31.scr.DEVL.x6791.tibmd31.s14602
JobSk1=/tmp/tigsmd31.jsk.DEVL.x6791.tibmd31.s14602
SYSLCJ1=/tmp/DEVL/tigsmd31.log.DEVL.x6791.tibmd31.s14602
End of awk.................
view
10/19/2011 06:24:17.999586, x7541, End PD03 (panel TIMD030) Txntime 0.914656 sec, pid 2177207
10/19/2011 06:24:19 accept() connection from 10.30.71.3 on socket 12
10/19/2011 06:24:20.383576, x7541, Begin PD03, pid 1303801
10/19/2011 06:24:21.447600, x7541, End PD03 (panel TIMD03A) Txntime 1.064024 sec, pid 1303801
10/19/2011 06:24:23 accept() connection from 10.30.71.3 on socket 12
10/19/2011 06:24:23.863714, x7541, Begin PD03, pid 1303901
10/19/2011 06:24:25.947599, x7541, End PD03 (panel TIMD03A) Txntime 2.083885 sec, pid 1303901
10/19/2011 06:24:26 accept() connection from 10.30.71.3 on socket 12
10/19/2011 06:24:26.719516, x7541, Begin PD03, pid 1304001
10/19/2011 06:24:31.882506, x7541, End PD03 (panel TIMD030) Txntime 5.162990 sec, pid 1304001
I would like to only keep lines that begin with a date.
I create the following egrep command, but it doesn't work right.
Code:
egrep '[0-12]/[0-31]/[2010-2100]' logfile.out
My log there was to grab anything with the date...but it doesn't work...any tips?
