Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • 1
    Now that the question is closed: the text used as replacement in sed's s command can't include unescaped newline characters. Each newline in the replacement must be preceded by a backslash. Commented Jun 12, 2021 at 11:13
  • @fra-san There is still the problem with the s(ubstitute) command s:pat:txt:, that whatever obscure character the script writer uses as :, the replacement string provided as an argument may also contain it, and therefore break unexpectedly. Commented Jun 12, 2021 at 13:45