EMBED THIS RECORDING:
I recorded this `poor man's text patcher` shellsession because I was trying to find a way easily
edit/read patchfiles for generated html.
This is a simplified example of the patchsystem I wrote. Commands used:
sed -i "s/searchterm/replacement/g" somefile.html
ps. don't forget to use ` and ' for m4 strings (not '' or "")
You do not need to escape target that much. Just escape the backslashes - sed accepts POSIX2
regexes, and in POSIX2 regexes the characters have a special meaning only when preceded by a
btw. I also noticed sed also excepts '|' as delimiter.
This is really handing when inserting urls without escaping like: