From: Max Nikulin <manikulin@gmail.com>
To: dash@vger.kernel.org
Subject: Re: stdin should be consumed line by line
Date: Sun, 30 Jun 2024 12:11:16 +0700 [thread overview]
Message-ID: <5ac9c288-4d06-4f84-aa37-cc8574094cb2@gmail.com> (raw)
In-Reply-To: <6640a8ee-eda0-1e35-df1a-c8b303440ca1@mail.de>
On 22/10/2021 18:11, Tycho Kirchner wrote:
> I think stdin should be consumed line by line in order to make passing
> to other commands possible. Please consider the following difference
> between the stdin "consumption" between bash and dash
>
> $ stdintest(){ printf 'echo one\ndash -c "while read -r row; do echo got
> row \$row; done" \necho two\n'; }
> $ stdintest | dash
> one
> two
> $ stdintest | bash
> one
> got row echo two
> $
>
> I think bash behaves "correct" here.
When I noticed the issue, I found this message with no response, but not
other threads. I believe, the following links may be useful for those
who will get this report in search engine results. It is a bug in dash
and latest released version does not contains its fix.
<https://lore.kernel.org/dash/20221213221732.6mvv22u7ktdozrbx@tarta.nabijaczleweli.xyz/t/>
[PATCH] input: preadfd: read standard input byte-wise
Tue, 13 Dec 2022 23:17:32 +0100
<https://lore.kernel.org/dash/cover.1717291846.git.herbert@gondor.apana.org.au/t/#u>
[v3 PATCH 0/3] Improve performance when reading stdin.
Sun, 02 Jun 2024 09:31:30 +0800
<https://bugs.debian.org/862907>
dash: Incorrectly slurps script from stdin (POSIX compliance issue)
prev parent reply other threads:[~2024-06-30 5:11 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-22 11:11 stdin should be consumed line by line Tycho Kirchner
2024-06-30 5:11 ` Max Nikulin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5ac9c288-4d06-4f84-aa37-cc8574094cb2@gmail.com \
--to=manikulin@gmail.com \
--cc=dash@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox