Harald van Dijk schreef op 04-12-15 om 19:51:
> Here it is. Attached is an updated patch that ignores the complete
> terminator if only a single field remains, otherwise ignores only
> trailing IFS whitespace.
I've tested the patch and it looks like it fixes the bug nicely.
With the patch, dash
On 03/12/2015 23:26, Harald van Dijk wrote:
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:
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
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
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".