On Wed, Mar 17, 2021 at 8:26 PM Greg Wooledge <g...@wooledge.org> wrote:

> I thought, for a moment, that bash already used $'...' quoting for
> newlines, but it turns out that's false.  At least for declare -p.
> It would be nice if it did, though.  Newlines, carriage returns, escape
> characters, etc.
>

It does in some cases:

 $ a=($'new \n line' $'and \e esc'); declare -p a
declare -a a=([0]=$'new \n line' [1]=$'and \E esc')

Reply via email to