Task

Replace every occurring instance of a piece of text in a group of text files with another one.



For this task we want to replace the text   "Goodbye London!"   with   "Hello New York!"   for a list of files.




$ include "seed7_05.s7i";
  include "getf.s7i";
 
const proc: main is func
  local
    var string: fileName is "";
    var string: content is "";
  begin
    for fileName range [] ("a.txt", "b.txt", "c.txt") do
      content := getf(fileName);
      content := replace(content, "Goodbye London!", "Hello New York!");
      putf(fileName, content);
    end for;
  end func;