this is how you figure it out
so you read first line, it doesn't match
so you read second line, it doesn't match
so you read third line, it matches
so you read fourth line, it doesn't match
so you read fifth line, it doesn't match
so when should you print lines you want to print?
how many lines do you have to remember?
In reply to Re: how to check for a word in a file and if found remove that line, the above line and the below line from the file. (step by step)
by Anonymous Monk
in thread how to check for a word in a file and if found remove that line, the above line and the below line from the file.
by Ganesh Bharadwaj1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |