I am reading data from a log file.
The log file will be like this :
19:40:25 DEBUG : Failed xml-common.noarch 0-0.6.3-18 - u
19:40:25 ERROR : Batch failed
19:40:25 DEBUG : Batch exited with ERROR 104
19:40:25 ERROR : Batch exited with ERROR 105
19:40:25 DEBUG : Batch exited with ERROR 104
19:40:25 INFO : Batch exited with ERROR 105
I am reading this log file line by line.
I need to store the line which contain " *Batch exited with ERROR *" in a variable using regular expressions.
I am triyng something like this
cat Mytest.log | while read data
do
TEST=`echo $data | grep __________
echo $TEST
done
Can any one complete my grep command ? or suggest any other logic?