I need to know the best approach for the following scenario
lets say we have some huge file which logs the output of the compilation and there are couple of error patterns which I want to test against this file, for eg. error patterns could be
- : error:
- : error [A-Z]*[\d ]*
- [A-Z]*[\d]* [E\e|rror:
- " Cannot open include file "
- " Could not find "
- "is not a member of"
- "has not been declared"
Let me know if this would be efficient:
- dump the file in some variable and close the file
- grep for each error from the list
- or create the regular expression for each of error and parse through the variable
Thank you