Hi Duncan, On Mon, Oct 07, 2024 at 10:52:54AM +1100, Duncan Roe wrote: > On Fri, Oct 04, 2024 at 03:18:28PM +0200, Phil Sutter wrote: > > This holds another interesting detail, though: By quoting your > > delimiter, you may disable expansion entirely which might improve > > readability in those ed commands? > > I did try quoting the delimiter when I was working on speeding up build_man.sh. > Rather to my surprise, the used CPU went up albeit by a tiny amount. I was > absolutely focussed on speed so left the delimiter unquoted. That's odd - while the shell will have to unquote the delimiter, it should have less work with the content. Are you sure this is not just noise you were measuring? > The CPU increase was so small that you might consider the improvement in > readability to be worth it. > > But there is another possible downside to quoting the delimiter. Some of the > here documents in build_man contain actual parameter substitution so would have > to be left as_is, leading to inconsistent appearance of here documents. Sure! > I'm happy to do it either way, LMK your preference. I don't have any, just stumbled upon this feature when checking for when/why unescaped backslashes are interpreted or not. Cheers, Phil