0
I am pretty new to windows batch scripting and am having trouble to search and extract a portion of a string from a text file and display it out. Some samples data are shown below.
The keyword for searching is based on student ID, for example: STUD777012
Appreciate if you could help out.
Thank you very much.
SAMPLE EXPECTED OUTPUT:
STUD777012, return code: 0, Analysis detected no errors
STUD777293, return code: 4, Analysis detected warnings
STUD777086, return code: 8, Analysis detected errors
STUD777099, return code: 0, Analysis detected no errors
SAMPLE LOG DATA:
Compiling STUD777012 to Data Structure
This is prg version 380.10.20
This is StudPrg.exe version 6.24
debug enabled version
StudPrg.exe finished
prg finished with return code: 0
status:
Analysis detected no errors
Compiling STUD777293 to Data Structure
This is prg version 380.10.20
This is StudPrg.exe version 6.24
debug enabled version
StudPrg.exe finished
This is StudPrg.exe version 6.24
debug enabled version
StudPrg.exe finished
prg finished with return code: 4
status:
Analysis detected warnings
Compiling STUD777086 to Data Structure
This is prg version 380.10.20
This is StudPrg.exe version 6.24
debug enabled version
StudPrg.exe finished
This is StudPrg.exe version 6.24
debug enabled version
StudPrg.exe finished
prg finished with return code: 8
status:
Analysis detected errors
Hi snowdude, thanks for your help. Appreciated it. However, I'm looking for a windows batch script. Thanks again. – Peter – 2014-08-15T01:09:30.900