Path: csiph.com!3.us.feeder.erje.net!feeder.erje.net!news.linkpendium.com!news.linkpendium.com!panix!usenet.stanford.edu!not-for-mail From: Tadeus Prastowo Newsgroups: gnu.bash.bug Subject: Re: Reading from a file by using its FD returns its contents only once Date: Mon, 31 Dec 2018 17:40:10 +0100 Lines: 21 Approved: bug-bash@gnu.org Message-ID: References: NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" X-Trace: usenet.stanford.edu 1546274433 32709 208.118.235.17 (31 Dec 2018 16:40:33 GMT) X-Complaints-To: action@cs.stanford.edu Cc: bug-bash To: mike b Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=unitn.it; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=yQ+x0m+Ln9eRDu9Cewvf3i4u1ME5Hz7Ue6NohXRRRoo=; b=ogoYLunt26K8LrOio6mPKf+8iBjbs+hMVFjezbSeYlNBfjR8OaSrAXaTz/CRjmyNIf ZnUjxhUqpbm3WagUaJ31x4lhQK7rkCe+472MyxoldEsSXXDPVTsjN+zLTDoG9cDqDE2G xoq8DZby5RPbw4jmOrejMwfv0QlS5eV//CQCw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=yQ+x0m+Ln9eRDu9Cewvf3i4u1ME5Hz7Ue6NohXRRRoo=; b=CRd2RSMI8XK0gnWQGVmbLWYkj9X42FAtlS7B7hd07YV8CL3GxLeCxc8p+ksf7zh31L bAmTMEkip0Btkt3g2qqNSTkYUIFhNsmyYbJD6WLuv+7TAdpESkDlCxHUg3JUa1lIeStL mb5ccY4ec/f4U1qjz5A9EUQu2nEzEXyJ0ovdFLQyuGR1EKTkmbmB0kSnojWwJltf21QF aAm0YJ3pmlY+jgTonYY/wlgbKfdvcnP9HIo2XM+zK0G10dVmrKc9GuZPXVL62eCs4zh9 2fV/+W/1agFdN80SFm2nS+JaJt3OdqAYU7sdCIOTL5rJxmUMpoI1ERuwS5zy3NJjq8r/ gAPQ== X-Gm-Message-State: AJcUukdNwp4G/Syp9RCN3ecjzj6IZUYwfABf8rMbL5iQA8ZE2ANEfoHp 1qSEv6si2xZTrYosg7MREctwMfZv1rYSUVQutcO9 X-Google-Smtp-Source: AFSGD/XU2uTc9/9wtMH0lhkZU7V9ZtS40StiPG8CjUfGCd9wv7a1tVOVmunRLfwqtcihlZHDPAGK5L+3ngn23QJBbbc= X-Received: by 2002:aed:356d:: with SMTP id b42mr37469584qte.186.1546274422109; Mon, 31 Dec 2018 08:40:22 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4864:20::832 X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com gnu.bash.bug:15016 On Mon, Dec 31, 2018 at 2:37 AM mike b 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