Hello,
I have a text file which has some contents. It has to be processed.
Can someone help me in doing it?
Find line which has Skipr. If Skipr is found then find the last character. The character tells the number of lines to be skipped. In the below example line 2 has Skipr and the last character is 1 so one line has to be skipped. line 3 should be skipped if it had been 2 then line 3 and 4 should be skipped.
Find the line C. If it has C then find N OR O. If N OR O is found then find the character left towards them. In the below example, line 5 has 1 towards the left of N. So, skip that much number of lines. So skip line 6
01 line1 This is one
02 line2 Skipr This is line 2 1
03 line3 This is three
04 line4 This is Four
05 line5 This is Five C It may contain 1 N Another sentence
06 line6 This is Six
07 line7 This is Seven
//OUTPUT
01 line1 This is one
02 line2 Skipr This is line 2 1
04 line4 This is Four
05 line5 This is Five C It may contain 1 N Another sentence
07 line7 This is Seven
Thanks