I have multiple files of work.log at different subfolders need to detect two keyword Can't find file
or Not pass by number
Direct path like :
/folder/Date/Job1/20190116_ADMtest_1/ADM.log
/folder/Date/Job1/20190122_ADMtest_2/ADM.log
/folder/Date/Job1/20190203_ADMtest_4/ADM.log
/folder/Date/Job1/20190217_ADMtest_3/ADM.log
/folder/Date/Job1/20190218_ADMtest_21/ADM.log
/folder/Date/Job1/20190225_ADMtest_18/ADM.log
In every log will look like:
[Message] 2019-01-16 11:13:21 Read 2 files from: 20190116_ADMtest_1txt
[Message] 2019-01-16 11:13:21
[Message] 2019-01-16 11:13:21 FATAL ERROR:Can't find file
[ERROR] 2019-01-16 11:13:21 ERROR Message : Stop
or like
[Message] 2019-01-22 10:56:06 # LOG 1 867 | Runtime: 0 hours 15 minutes and 45 seconds.
[Message] 2019-01-22 10:56:06 # Message 1 867 |
[Message] 2019-01-22 10:56:06 # Message 2 152 |
[Message] 2019-01-22 10:56:06 Average number: 58.534678
[ERROR] 2019-01-22 10:56:06 The file failed average number: Average number = 58.534678
I want to get a list to know which subfolders have ErrorI Can't find file
and which subfolders have ErrorII Not pass by number
Desire Output like :
ErrorI.txt
20190116_ADMtest_1
20190203_ADMtest_4
20190225_ADMtest_18
ErrorII.txt
20190122_ADMtest_2
20190217_ADMtest_3
20190218_ADMtest_21