Re: ${parameter/pattern/string} behaviour changed

2018-03-16 Thread L A Walsh
d...@ftb-esv.de wrote: Description: Command: x="a b c"; echo "'${x// /','}'" On old systems the output is: 'a','b','c' In this version the output is: 'a,b,c' This new behavior breaks some scripts. --- The way I'd see it is that the ',' in the replacement tex

Re: ${parameter/pattern/string} behaviour changed

2018-03-16 Thread Eduardo Bustamante
On Fri, Mar 16, 2018 at 1:18 PM, wrote: [...] > Bash Version: 4.3 > Patch Level: 42 > Release Status: release > > Description: > Command: x="a b c"; echo "'${x// /','}'" > On old systems the output is: 'a','b','c' > In this version the output is: 'a,b,c' > This ne

Re: ${parameter/pattern/string} behaviour changed

2018-03-16 Thread Greg Wooledge
On Fri, Mar 16, 2018 at 08:18:53PM +0100, d...@ftb-esv.de wrote: > Command: x="a b c"; echo "'${x// /','}'" > On old systems the output is: 'a','b','c' > In this version the output is: 'a,b,c' So, this LOOKS like an attempt to take a list, and write it out with single quotes aro

${parameter/pattern/string} behaviour changed

2018-03-16 Thread dc
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc -I/home/abuild/rpmbuild/BUILD/bash-4.3 -L/home/abuild/rpmbuild/BUILD/bash-4.3/../readline-6.3 Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -D

Re: String behaviour

2012-03-28 Thread Michael Witten
On Fri, Jun 24, 2011 at 10:38, BX wrote: > #/bin/bash > # file1 > import() > { >   source file2 > } > > import > > echo v1=$v1, v2=$v2, v3=$v3 > > #/bin/bash > # file2 > v1=v1 > declare -x v2=v2 > declare v3=v3 > > Run above script by > $ bash file1 > > Expected result: v1=v1, v2=v2, v3=v3 > Real