I have a list of file names and line numbers in the following format:
./foo.txt:1:(more characters) ./foo.txt:3:(more characters) ./bar.txt:10:(more characters)
The list could be from a file or it could be output by a process (for example,
I want to append some fixed text to each of the referenced lines, modifying the files in place.
For example, if the file foo.txt contains the following text:
One Two Three Four
I want it to be modified to contain:
One TODO Two Three TODO Four
Similarly, " TODO" should be appended to line 10 of bar.txt.
How can I do this?