Re: Reading from a file by using its FD returns its contents only once
From:
Tadeus Prastowo
Subject:
Re: Reading from a file by using its FD returns its contents only once
Date:
Mon, 31 Dec 2018 17:40:10 +0100
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