chanman525
IS-IT--Management
I have a log file that I'm trying pull information out of. The information needs to be between noon and the end of the day. My line of code is the following...
egrep '1([2-9][0-9][1-9]))|2([0-3]' ma.log > ma1.LOG
When I run this, it places all of this into the file...
+1 Wed Apr 18 00:17:41 EDT 2007 : License 78768771 for item 63157 deleted by maj
+2 Wed Apr 18 02:19:37 EDT 2007 : Radio 253 reset by maj
+3 Wed Apr 18 02:19:45 EDT 2007 : Radio 253 reset by maj
+4 Tue Apr 17 03:20:30 EDT 2007 : Radio s990rm3 reset by maj
+5 Tue Apr 17 03:20:43 EDT 2007 : Radio 163 reset by maj
+6 Tue Apr 17 19:18:33 EDT 2007 : RF work for s990ts10 moved [90]-[258] by maj
+7 Tue Apr 17 19:33:08 EDT 2007 : RF work for s990cm14 moved [150]-[300] by maj
+8 Tue Apr 17 20:07:26 EDT 2007 : Radio 204 reset by maj
+9 Tue Apr 17 22:03:04 EDT 2007 : Radio 351 reset by maj
+10 Tue Apr 17 22:41:39 EDT 2007 : Radio 253 reset by maj
+11 Tue Apr 17 23:20:19 EDT 2007 : Radio 253 reset by maj
~
I have no idea what I'm missing. I thought that egrep string would only pull information from noon on. Can anyone see if I'm doing something wrong here?
egrep '1([2-9][0-9][1-9]))|2([0-3]' ma.log > ma1.LOG
When I run this, it places all of this into the file...
+1 Wed Apr 18 00:17:41 EDT 2007 : License 78768771 for item 63157 deleted by maj
+2 Wed Apr 18 02:19:37 EDT 2007 : Radio 253 reset by maj
+3 Wed Apr 18 02:19:45 EDT 2007 : Radio 253 reset by maj
+4 Tue Apr 17 03:20:30 EDT 2007 : Radio s990rm3 reset by maj
+5 Tue Apr 17 03:20:43 EDT 2007 : Radio 163 reset by maj
+6 Tue Apr 17 19:18:33 EDT 2007 : RF work for s990ts10 moved [90]-[258] by maj
+7 Tue Apr 17 19:33:08 EDT 2007 : RF work for s990cm14 moved [150]-[300] by maj
+8 Tue Apr 17 20:07:26 EDT 2007 : Radio 204 reset by maj
+9 Tue Apr 17 22:03:04 EDT 2007 : Radio 351 reset by maj
+10 Tue Apr 17 22:41:39 EDT 2007 : Radio 253 reset by maj
+11 Tue Apr 17 23:20:19 EDT 2007 : Radio 253 reset by maj
~
I have no idea what I'm missing. I thought that egrep string would only pull information from noon on. Can anyone see if I'm doing something wrong here?