![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Help me with parsing this file | eamani_sun | Shell Programming and Scripting | 2 | 05-16-2008 03:39 PM |
| awk and file parsing | devtakh | Shell Programming and Scripting | 4 | 05-06-2008 11:13 AM |
| Parsing a csv file | chiru_h | Shell Programming and Scripting | 6 | 02-12-2008 09:33 AM |
| File Parsing | jsusheel | Shell Programming and Scripting | 5 | 09-25-2007 10:25 AM |
| parsing file through awk | bbeugie | Shell Programming and Scripting | 13 | 08-22-2006 01:21 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hi All,
I'm deffently not a Unix specialist so be Gentel. I need to parse a Log file that looks like that: 2006-06-12 01:00:00,463 ERROR [shared.logger.LoggerCleaner] {cleanLoggersFiles} General Error comverse.compas.shared.exceptions.SystemParametersException: Error in reading parameter FileLocation at comverse.compas.shared.paramhandler.SystemParametersDelegate.getStringValue(SystemParametersDelegate .java:186) at comverse.compas.shared.logger.LoggerCleaner.cleanLoggersFiles(LoggerCleaner.java:110) at comverse.compas.shared.logger.LoggerCleaner.run(LoggerCleaner.java:66) My request is to Count the number of 'Error' occurences in the file in the current day, starting 00:00 till 00:00 Whats the best way to do that? Thanks Tal |
|
||||
|
Still doent work
Thanks Jean-Pierre,
I have tried the command but havent received the expected result. I have also tried your command by giving a specific date and it still doent work: grep -c "2006-06-18 [0-9:,] *ERROR" SPMAgent_Debug.log 0 dsu001-sys01a:/var/cti/logs/spmagent ROOT > grep "2006-06-18" SPMAgent_Debug.log 2006-06-18 01:00:00,528 ERROR [shared.logger.LoggerCleaner] {cleanLoggersFiles} General Error As U can see I hace the sring ERROR on the 18th but using the command I get the counter 0 any thoughts Tal |
|
||||
|
Looks like a trypo?
You have: Code:
grep -c "2006-06-18 [0-9:,] *ERROR" SPMAgent_Debug.log Code:
grep -c "2006-06-18[ 0-9:,] *ERROR" SPMAgent_Debug.log |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|