I have a simple string as follows:
findstr /c:"error" acstest.x >reason.txt
what I am attempting is once the error is found I need to step back 3 lines to show the reson for the error.
So my question is how can I step back 3 lines and display the reason code... please bear in mind that the file could have many errors and the file could be very large..
the foot print of the error is as follows:
reason =xxx
data
error
then it repeats over and over again.
findstr /c:"error" acstest.x >reason.txt
what I am attempting is once the error is found I need to step back 3 lines to show the reson for the error.
So my question is how can I step back 3 lines and display the reason code... please bear in mind that the file could have many errors and the file could be very large..
the foot print of the error is as follows:
reason =xxx
data
error
then it repeats over and over again.