Re: dash: read does not ignore trailing spaces

2015-12-03 Thread Stephane Chazelas
2015-12-03 23:17:58 +, Stephane Chazelas: > 2015-12-03 23:04:31 +, Stephane Chazelas: > [...] > > > Summarising: POSIX states that "each occurrence in the input of an IFS > > > character that is not IFS white space, along with any adjacent IFS white > > > space, shall delimit a field". This

Re: dash: read does not ignore trailing spaces

2015-12-03 Thread Stephane Chazelas
2015-12-03 23:04:31 +, Stephane Chazelas: [...] > > Summarising: POSIX states that "each occurrence in the input of an IFS > > character that is not IFS white space, along with any adjacent IFS white > > space, shall delimit a field". This *may* be interpreted to read that a > > final non-white

Re: dash: read does not ignore trailing spaces

2015-12-03 Thread Stephane Chazelas
2015-12-03 22:43:39 +0100, Martijn Dekker: > Stephane Chazelas schreef op 03-12-15 om 22:17: > > It's meant to split into "a" and "b", not "a", "b" and "". As > > ":" is meant to be treated as a *delimiter* or *terminator*. > > That was my interpretation of the standard, too. So I reported this as

Re: dash: read does not ignore trailing spaces

2015-12-03 Thread Harald van Dijk
On 03/12/2015 22:17, Stephane Chazelas wrote: 2015-12-03 22:02:14 +0100, Harald van Dijk: [] $ for shell in bash mksh posh zsh; do printf %s: "$shell"; $shell -c 'IFS=,; echo a, | { read v; echo "<$v>"; }'; done bash: mksh: posh: zsh: As far as I can tell, the posh/zsh behavi

Re: dash: read does not ignore trailing spaces

2015-12-03 Thread Martijn Dekker
Stephane Chazelas schreef op 03-12-15 om 22:17: > It's meant to split into "a" and "b", not "a", "b" and "". As > ":" is meant to be treated as a *delimiter* or *terminator*. That was my interpretation of the standard, too. So I reported this as a bug to author of yash, but he reads the standard d

Re: dash: read does not ignore trailing spaces

2015-12-03 Thread Stephane Chazelas
2015-12-03 22:02:14 +0100, Harald van Dijk: [] > $ for shell in bash mksh posh zsh; do printf %s: "$shell"; $shell > -c 'IFS=,; echo a, | { read v; echo "<$v>"; }'; done > bash: > mksh: > posh: > zsh: > > As far as I can tell, the posh/zsh behaviour is the correct > behaviour, but I'

Re: dash: read does not ignore trailing spaces

2015-12-03 Thread Harald van Dijk
On 02/12/2015 23:37, Gioele Barabucci wrote: Hello, I am forwarding a bug [1] reported by a Debian user: `read` does not ignore trailing spaces. The current version of dash is affected by this bug. A simple test from the original reporter: $ dash -c 'echo " a b " | { read v ; echo "<$v>