How to grep multiple string occurance in input file using single grep command? I have below input file with many IDP, RRBE messages. Out put should have count of each messages.
I have used below command but it is not working
grep -cH "(sent IDP Request)(Recv RRBCSM)" *.txt >>Sigtran_Errorlogs.txt
Inputfilebelow messages present multiple times)
[14:39:10 10/12/2009]:: SStub-->ICC: otId[1218] sent IDP Request
[14:39:10 10/12/2009]:: ICC-->SStub: otId[2015304695] dtId[10] Recv RRBCSM
[14:39:10 10/12/2009]:: ICC-->SStub: otId[2015304695] dtId[10] Recv ACH
[14:39:10 10/12/2009]:: ICC-->SStub: otId[2015304695] dtId[10] Recv CONNECT/CONTINUE Request
[14:39:10 10/12/2009]:: SStub-->ICC: otId[10] dtId[2015304695] sent ERB Answer
[14:39:10 10/12/2009]:: SStub-->ICC: otId[10] dtId[2015304695] sent ERB Disconnect
[14:39:10 10/12/2009]:: SStub-->ICC: otId[10] dtId[2015304695] sent ACR
[14:39:10 10/12/2009]:: SStub-->ICC: otId[10] dtId[2015304695] sent TC_END
Outputfile (Sigtran_Errorlogs.txt) should look like:
150 capMessageLog.txt.log: sent IDP Request
100 capMessageLog.txt.log: Recv RRBCSM