[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: weird insert of backslashes in strings
From: |
Chet Ramey |
Subject: |
Re: weird insert of backslashes in strings |
Date: |
Wed, 9 Jan 2019 09:59:06 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 |
On 1/8/19 3:50 PM, axel@freakout.de 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\/\\\
> /
This was literally the last change I made. I guess I'll have to do it a
different way. The attached patch will fix it.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/
glob-pattern-backslash.patch
Description: Text document