I have a very large text file, I use fgets () to get the contents of the file line by line. but I need to delete some text from the file if a certain condition is met.
Example:
hello world am string number 1 hello world am string number 2
hello world am string A hello world am string B
lets say that the condition occurs on line 1, then I want to delete lines 1 and 2, but I do nothing for lines A and B
source
share