r...@saturn.syslang.net wrote:

> Description:
>       use of $(< filename | program) does not work. It either should or it 
> should be properly documented.
>       The problem also happens on bash4.
> 
> Repeat-By:
> 
>       qq=$(< /etc/passwd | grep sys)
>       echo $qq
>       # result is null
> 
> Fix:
>       Either fix the docs to tell people that a pipe is not allowed or fix 
> the code to allow it.

That construct is very limited.  As the bash man page says:

The command substitution $(cat file) can be replaced by the equivalent
but faster $(< file).

That seems pretty clear.

Chet

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


Reply via email to