Write all the lines including changed ones into a variable, and then when you're done with reading the file, open it again for writing. Then write the content of your variable into it.
--
tune
In reply to Re: search-and-replace in files
by tune
in thread search-and-replace in files
by vxp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |