Dash only reads the first character from pipe (bash reads whole line)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxx>

--
To unsubscribe from this list: send the line "unsubscribe dash" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux