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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Дилян Палаузов <dilyan.palauzov@xxxxxxxxx> 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.
The portable solution is printf(1).  If you cannot use printf(1),
perhaps use a here-document instead:

	cat <<- EOF &&
		cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
	EOF

Cheers,
-- 
Email: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux