Andreas Schwab wrote:
> Jim Meyering <[email protected]> writes:
>
>> Andreas Schwab wrote:
>>> Jim Meyering <[email protected]> writes:
>>>
>>>> (note that below there's the added advantage of not having to
>>>> double-quote to include $nl and hence not having to double-backslash)
>>>
>>> You can have that with the variable as well.
>>
>> You're right. We could write it like this:
>>
>> printf '\na\nb'|tac -rs '.\|'$nl
>
> No, you need the quotes around $nl.
You need the double quotes around $nl with bash,
but not with zsh:
zsh$ nl='
quote> '
zsh$ printf %s $nl
zsh$