bug-bash
[Top][All Lists]
Advanced

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

Re: weird insert of backslashes in strings


From: Dennis Williamson
Subject: Re: weird insert of backslashes in strings
Date: Tue, 8 Jan 2019 15:49:36 -0600

On Tue, Jan 8, 2019, 3:10 PM <address@hidden wrote:

> Configuration Information [Automatically generated, do not change]:
> Machine: i686
> OS: linux-gnu
> Compiler: gcc
> Compilation CFLAGS: -fstack-protector -Wno-parentheses -Wno-format-security
> uname output: Linux bongo 2.6.32-042stab134.8 #1 SMP Fri Dec 7 17:16:09
> MSK 2018 i686 i686 i386 GNU/Linux
> Machine Type: i686-pc-linux-gnu
>
> Bash Version: 5.0
> Patch Level: 0
> Release Status: release
>
> Description:
> This script "weirdbackslashes":
>
> $ cat weirdbackslashes
> #===begin
> PRE='\/'
> echo 'define'${PRE}'\
> /'
> #===end
>
> produces with bash4:
> $ bash weirdbackslashes
> define\/\
> /
>
> and with bash5:
> $ bash5 weirdbackslashes
> \d\e\f\i\n\e\/\\\
> /
>
> Repeat-By:
> see Description
>


Reproduced. By the way, double quoting the variable eliminated the problem.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]