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.
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.
That fails if there are two lines in a row that matches.
That can fail if the last line matches. You can't rely on a file handle return EOF more than once.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: 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 hdb (Monsignor) on Jan 22, 2016 at 19:16 UTC |