Thanks You Damian for your comments ....
I will normally be having many SQLSTATEs and it might grow ... So, ignore state file will be the best approach ...
I have documented the following as the limitations of the script

Both are grep's limitations)
1. Lines are limited to 2048 bytes.
2. Paragraphs (under the -p flag) are currently limited to a length of
5000 characters.
Is there a way out ?
Thanks
Sathyaram
Quote:
Originally posted by Damian Ibbotson
Sorry, I meant...
grep -p "SQLSTATE" sql.out | grep -vp -f ignore_state.txt
However, if you only intend to exclude 1 or 2 sqlstates, you could do away with your 'ignore' file and do something like this...
awk 'BEGIN {RS=""} /SQLSTATE/ && ! /01550|XXXXX|NNNNN/' sql.out
RS="" sets the record seperator to a blank line and the rest is just a pattern match and an inverted pattern match where 01550, XXXXX and NNNNN are sqlstates that you want to ignore.
|