dash.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Dash only reads the first character from pipe (bash reads whole line)
@ 2015-11-13 23:24 Gioele Barabucci
  2015-11-14 10:51 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Gioele Barabucci @ 2015-11-13 23:24 UTC (permalink / raw)
  To: dash

Hello,

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?

Regards,

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

--
Gioele Barabucci <gioele@svario.it>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-14 10:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-13 23:24 Dash only reads the first character from pipe (bash reads whole line) Gioele Barabucci
2015-11-14 10:51 ` Herbert Xu

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).