Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #15016 > unrolled thread

Re: Reading from a file by using its FD returns its contents only once

Started byTadeus Prastowo <tadeus.prastowo@unitn.it>
First post2018-12-31 17:40 +0100
Last post2018-12-31 17:40 +0100
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Reading from a file by using its FD returns its contents only once Tadeus Prastowo <tadeus.prastowo@unitn.it> - 2018-12-31 17:40 +0100

#15016 — Re: Reading from a file by using its FD returns its contents only once

FromTadeus Prastowo <tadeus.prastowo@unitn.it>
Date2018-12-31 17:40 +0100
SubjectRe: Reading from a file by using its FD returns its contents only once
Message-ID<mailman.6624.1546274433.1284.bug-bash@gnu.org>
On Mon, Dec 31, 2018 at 2:37 AM mike b <michallinuxstuff@gmail.com> wrote:

[...]

> The above is just an example. Doing reads on any other regular file like
> this yields same behavior:
> # echo bla >./t
> # exec 10<./t
> # read -r <&10
> # echo $REPLY
> bla
> # read -r <&10
> # echo $REPLY

That's correct behavior because the second `read -r' already hits an
EOF, isn't that?

--
Best regards,
Tadeus

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web