Re: « echo '"\$z' » — differences betw een dash and bash in POSIX mode irrespective of xpg_echo

Harald van Dijk <[email protected]> Mon, 21 Oct 2024 06:01:53 +0100
Newsgroups org.kernel.vger.dash
Message-ID <[email protected]>
On 21/10/2024 05:34, Herbert Xu wrote:
> Дилян Палаузов <[email protected]> wrote:
>>
>> I download https://ftp.gnu.org/gnu/gdb/gdb-15.2.tar.xz and run there ./configure . configure has on line 19728
>>
>>    echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
> 
> The issue is that echo(1) with a backslash character is not portable.

This particular use of echo with a backslash character used to work the 
same way across shells and is widely used in configure scripts in a 
large number of packages (specifically: any that use AC_SUBST_FILE). It 
was changed by commit 776424a8 (parser: Add dollar single quote) without 
that commit indicating that this would change; are you really sure this 
should not be viewed as a bug? The impact will be massive.

Cheers,
Harald van Dijk