Hello,
I am trying to grep my log files for ORA errors, except ORA-00001.
I have tried:
grep 'ORA*!(-00001)' *.log
but it is not working.
Any help will be much appreciated.
Thank you.
Hello,
I am trying to grep my log files for ORA errors, except ORA-00001.
I have tried:
grep 'ORA*!(-00001)' *.log
but it is not working.
Any help will be much appreciated.
Thank you.
Try:
awk '/ORA/&&!/ORA-00001/' file
sed -n '/ORA-[0-9][0-9]*[^00001]/p'
@ygemici. That will not work ( [^00001]
is equivalent to [^01]
):
$ echo ORA-00011 | sed -n '/ORA-[0-9][0-9]*[^00001]/p'
$
Try this:
sed '/ORA-00001/d;/ORA/!d' infile
thanks friend i have written this urgently i have forgotten other conditions..
however if we only except `ORA-00001` we can use this
sed -n '/ORA-/{;/00001/!p;}' infile
regards
ygemici
grep 'ORA' *.log |grep -v "-00001"