bug-bash
[Top][All Lists]
Advanced

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

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


From: DJ Mills
Subject: Re: [here string] uncompatible change on here string function
Date: Wed, 22 Nov 2017 09:19:14 -0500

On Wed, Nov 22, 2017 at 9:00 AM, Peter & Kelly Passchier <
address@hidden> 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 claiming/reporting:
> $ bash-4.4-12
> $ var=$'foo\t\tbar'
> $ cat <<<$var
> foo             bar
>
> # Without the quotes, the tabs still get expanded, that should not
> # happen, they should collapse into 1 space, this is a bug if true.
>
> Peter
>

The bash 4.4 man page states:

 The word undergoes brace  expansion,  tilde  expansion,  parameter  and
       variable  expansion,  command  substitution,  arithmetic expansion,
and
       quote removal.  Pathname expansion and  word  splitting  are  not
per‐
       formed.   The  result  is  supplied  as a single string, with a
newline
       appended, to the command on its standard input (or file descriptor n
if
       n is specified).

It would seem that this is an intentional change


reply via email to

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