Hi Duncan, On Fri, Oct 04, 2024 at 02:06:39PM +1000, Duncan Roe wrote: > Search for exact match of ".RI" had a '\' to escape '.' from the regexp > parser but was missing another '\' to escape the 1st '\' from shell. > Had not yet caused a problem but might as well do things correctly. Your patch looks correct and bash(1) confirms the need for escaping: "If any part of word is quoted, the delimiter is the result of quote removal on word, and the lines in the here-document are not expanded. If word is unquoted, all lines of the here-document are subjected to parameter expansion, command substitution, and arithmetic expansion, the character sequence \<newline> is ignored, and \ must be used to quote the characters \, $, and `." This holds another interesting detail, though: By quoting your delimiter, you may disable expansion entirely which might improve readability in those ed commands? Cheers, Phil