dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gioele Barabucci <gioele@svario.it>
To: dash@vger.kernel.org
Subject: Dash only reads the first character from pipe (bash reads whole line)
Date: Sat, 14 Nov 2015 00:24:06 +0100	[thread overview]
Message-ID: <n25ren$pf5$1@ger.gmane.org> (raw)


a 6 year old Debian bug [1] describes a problem with reading from pipes 
that is still present in the current dash version (I tested up to git 
commit 7062c78).

The following test, by the original reporter, shows the problem

 > The 'read' command seems to only read the first character and not the 
 > whole line.
 > Example / comparison with bash:
 > # /bin/dash
 > # sudo modprobe nf_conntrack
 > # read MAX </proc/sys/net/netfilter/nf_conntrack_max
 > # echo $MAX
 > 2
 > # /bin/bash
 > # read MAX </proc/sys/net/netfilter/nf_conntrack_max
 > # echo $MAX
 > 262144

It this a known problem? Are there workarounds?


[1] https://bugs.debian.org/547902

Gioele Barabucci <gioele@svario.it>

             reply	other threads:[~2015-11-13 23:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-13 23:24 Gioele Barabucci [this message]
2015-11-14 10:51 ` Herbert Xu

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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='n25ren$pf5$1@ger.gmane.org' \
    --to=gioele@svario.it \
    --cc=dash@vger.kernel.org \
    --subject='Re: Dash only reads the first character from pipe (bash reads whole line)' \


* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).