On Thu, Aug 29, 2013 at 12:42 PM, DJ Mills <danielmil...@gmail.com> wrote:

> When using a non-default IFS (a default IFS would trim them), a single
> empty trailing field is ignored for read -a.
>
> IFS=: read -rd '' -a arr < <(printf %s ':foo:bar:'); printf '<%s> '
> "${arr[@]}"; echo
> <> <foo> <bar>
>
> I would expect the output to be:
> <> <foo> <bar> <>
>

By the way, this is on 4.2.45(2)-release, but it also occurs on
4.2.45(1)-release and 3.2.51(1)-release.

A workaround is to use < <(printf %s: "$foo"), but that shouldn't be needed.

Reply via email to