Re: [here string] uncompatible change on here string function

2017-11-22 Thread Greg Wooledge
On Wed, Nov 22, 2017 at 11:22:47AM +0800, 尹剑虹 wrote: > The command line to the right of "<<<" is no longer cut by IFS > > [yjh@bash4.4 ~]$ var=$(echo -e "foo\t\tbar") > [yjh@bash4.4 ~]$ read a <<<$var; echo "$a" > foo bar > > [yjh@bash4.2 ~]$ var=$(echo

Re: [here string] uncompatible change on here string function

2017-11-22 Thread Peter & Kelly Passchier
On 11/22/2017 08:04 PM, Greg Wooledge wrote: wooledg:~$ bash-4.2 wooledg:~$ var=$'foo\t\tbar' wooledg:~$ cat <<< "$var" foo bar I think you are missing the point. He is claiming/reporting: $ bash-4.4-12 $ var=$'foo\t\tbar' $ cat <<<$var foo bar # Without the quotes, the

Re: [here string] uncompatible change on here string function

2017-11-22 Thread Greg Wooledge
On Wed, Nov 22, 2017 at 09:00:09PM +0700, Peter & Kelly Passchier wrote: > I think you are missing the point. He is claiming/reporting: Why write code that relies on the idiosyncratic behavior of a shell when it is given incorrect code? Whether bash handles incorrect code in one way or another se

Re: [here string] uncompatible change on here string function

2017-11-22 Thread DJ Mills
On Wed, Nov 22, 2017 at 9:00 AM, Peter & Kelly Passchier < peterke...@passchier.net> wrote: > On 11/22/2017 08:04 PM, Greg Wooledge wrote: > >> wooledg:~$ bash-4.2 >> wooledg:~$ var=$'foo\t\tbar' >> wooledg:~$ cat <<< "$var" >> foo bar >> > > I think you are missing the point. He is cl

Re: [here string] uncompatible change on here string function

2017-11-22 Thread Chet Ramey
On 11/22/17 9:19 AM, DJ Mills wrote: > On Wed, Nov 22, 2017 at 9:00 AM, Peter & Kelly Passchier < > peterke...@passchier.net> wrote: > >> On 11/22/2017 08:04 PM, Greg Wooledge wrote: >> >>> wooledg:~$ bash-4.2 >>> wooledg:~$ var=$'foo\t\tbar' >>> wooledg:~$ cat <<< "$var" >>> foo bar >

Re: [here string] uncompatible change on here string function

2017-11-22 Thread PePa
On 11/23/2017 02:23 AM, Chet Ramey wrote: The bash-4.2 man page defers the description of here strings to the description of here documents. The lines in a here document do not undergo word splitting. It was a bug in bash-4.2 that the WORD in a here string was split. This finally got fixed in b

Re: [here string] uncompatible change on here string function

2017-11-22 Thread Chet Ramey
On 11/22/17 8:17 PM, PePa wrote: > On 11/23/2017 02:23 AM, Chet Ramey wrote: >> The bash-4.2 man page defers the description of here strings to the >> description of here documents. The lines in a here document do not undergo >> word splitting.  It was a bug in bash-4.2 that the WORD in a here stri