Re: « echo '"\$z' » — differences between dash and bash in POSIX mode irrespective of xpg_echo
Дилян Палаузов <[email protected]> Mon, 21 Oct 2024 23:04:09 +0300
| Newsgroups | org.kernel.vger.dash |
|---|---|
| Message-ID | <[email protected]> |
Hello, autoconf was updated to avoid this pitfall: http://git.savannah.gnu.org/gitweb/?p=autoconf.git;a=commit;h=53c23bb4e1cd8aa35248c73277fa08b7c38a6ad9 Greetings Дилян -----Original Message----- From: Harald van Dijk <[email protected]> To: Herbert Xu <[email protected]>, Дилян Палаузов <[email protected]> Cc: [email protected] Subject: Re: « echo '"\$z' » — differences between dash and bash in POSIX mode irrespective of xpg_echo Date: 21/10/24 08:01:53 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