Date: Sat, 21 Dec 2024 13:49:48 -0500 From: Greg Wooledge <g...@wooledge.org> Message-ID: <20241221184948.gm29...@wooledge.org>
| Choice #2: use $'...' quoting, | Choice 2 is a bash extension. No it isn't, or at least not any more. Dollar-Quote quoting (sometimes called C-stye strings) is in the latest POSIX standard. I'm not sure of its origins (it was proposed to POSIX decades ago), Chet can confirm, but I suspect bash picked it up from the proposal to POSIX. This form of quoting will be found in any shell claiming to be even close to up to date now (but beware of using it outside what is specified to work, once you go there, behaviours are not identical). kre