Let's suppose I have a file, demo.txt
. This file contains three lines which are:
- line 1
- line 2
- line 3
I want to edit this file lines while iterating the demo.txt. For example, the program started to iterating, and now we are at line 1.
Now we modify this line to line 1.1 and press Enter the continue to iterate to the line 2. When I pressed enter the line 1.1 is saved to demo.txt
file.
Then the same thing for line 2, i have changed line 2 to line 2.2 and pressed enter. The same thing for line 3: Change to line 3.3, press Enter to save and finished. This should be apply to every line. Is there a way to achieve that?