On 2/8/17 3:04 PM, Conor McCarthy wrote:

> Bash Version: 4.4
> Patch Level: 12
> Release Status: release
> 
> Description:
>         Here strings are documented as:
> 
>            [n]<<<word
> 
>         The word undergoes brace  expansion,  tilde  expansion,  parameter  
> and
>         variable  expansion,  command  substitution,  arithmetic expansion, 
> and
>         quote removal.
> 
>         But brace expansion is not applied:
> 
>         $ read zz <<< {1..9}
>         $ echo $zz
>         {1..9}
> 
>         The codepath from write_here_string() does not pass through any
>         expand_xxx functions which apply brace expansion, AFAICT.
> 
>         (bash was built with -fno-inline for gdb only)
> 
> Repeat-By:
>         $ read zz <<< {1..9}
>         $ echo $zz
>         {1..9}
> 
>         Expected behaviour would be similar to:
>         $ read zz <<< $(echo {1..9})
>         $ echo $zz
>         1 2 3 4 5 6 7 8 9

Thanks for the report.  This is a documentation error.  Your workaround
is a reasonable one.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://cnswww.cns.cwru.edu/~chet/

Reply via email to