builtin: Fix handling of trailing IFS white spaces
The read built-in does not handle trailing IFS white spaces in
the right way, when there are more fields than variables. Part
of the problem is that this case is handled outside of ifsbreakup.
Harald van Dijk wrote a patch to fix this by moving the magic
into ifsbreakup itself.
This patch further reorganises the ifsbreakup loop by having only
one loop over the whole string.
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Tested-by: Harald van Dijk <harald@gigawatt.nl>
3 files changed