I have some batch tests which dump data files of the following format in a folder. Each test dumps 1 file and the file name is a generic serial number. I would like to generate a list of all failed log filenames with the Testname.
I can use xargs but unable to print out the Testname. Following script dumps every log file, and it's workable though I would like a better solution.
grep 'Fail\|Testname' *.log
Sample File test_0123.log
[other log of 20MB]
* Result : Pass/Fail
* Testname : test_example_rsa_key_gen
[other log and trailer]
Testname
? And what is theTestcase
ingrep 'Fail\|Testcase' *.log
?Result
andTestname
, or are there more lines?