bug-bash
[Top][All Lists]
Advanced

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

Re: Bash-4.3 Official Patch 25


From: Greg Wooledge
Subject: Re: Bash-4.3 Official Patch 25
Date: Thu, 25 Sep 2014 10:02:07 -0400
User-agent: Mutt/1.4.2.3i

On Thu, Sep 25, 2014 at 02:50:03PM +0100, Jason Vas Dias wrote:
> But now there is an issue - bash seems to lose its idea of stdout / stderr 
> being
> a terminal within read loops, as illustrated by this test script (/tmp/t.sh):
> 
> <quote>
> #!/bin/bash
>  tty
> echo $'1\n2' > test.list;
> while read line; do
>     tty;
> done < test.list
> </quote>

Well, that's because you have redirected stdin.  Try this instead:

while read line <&3; do
    tty
done 3< test.list



reply via email to

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