bug-bash
[Top][All Lists]
Advanced

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

Re: Use of pipe in $(< filename | program) returns null


From: Bernd Eggink
Subject: Re: Use of pipe in $(< filename | program) returns null
Date: Sat, 28 Nov 2009 11:42:18 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.1.4pre) Gecko/20090915 Thunderbird/3.0b4

Am 28.11.2009 06:35, schrieb root@saturn.syslang.net:

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.

The problem is not the pipe but the fact that '<filename' is an empty command which does nothing. If you want 'program' to read from 'file', use 'program<file'.

Bernd

--
Bernd Eggink
http://sudrala.de




reply via email to

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