I wrote the below code to search a string in a file (in file1.log) & once it find the line, I want to copy the next 5 lines to output.log file. I tried to the below first to get only 1 line but it did not work.
How I should modify it to capture next 5 lines to the output.log file?