Thanks all.
Now I got it:
The point is the action on bash-4.2 and before deosn't match the action on ksh
and zsh.
Jianhong
发自网易邮箱手机版
在2017年11月27日 23:42,Vladimir Marek 写道:
> > It's not the point. the problem is bash-4.4 auto add quote around $var or
> > $(cmd) after '<<<'
> >
> > On
> > It's not the point. the problem is bash-4.4 auto add quote around $var or
> > $(cmd) after '<<<'
> >
> > On bash-4.2 and before following command always works fine
> > read ignore fstype <<<$(df --output=fstype $mountpoint)
> >
> > But after Update bash-4.4, our customer's script get
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
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
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
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
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,
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 ~]$
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64'
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-redhat-linux-gnu'
-DCONF_VENDOR='redhat'