On 8/29/13 12:42 PM, DJ Mills 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
> <>
>
> I would expect the output to be:
> <>
On Thu, Aug 29, 2013 at 2:54 PM, Greg Wooledge wrote:
> On Thu, Aug 29, 2013 at 12:57:22PM -0400, DJ Mills wrote:
> > On Thu, Aug 29, 2013 at 12:42 PM, DJ Mills
> wrote:
> >
> > > When using a non-default IFS (a default IFS would trim them), a single
> > > empty trailing field is ignored for rea
On Thu, Aug 29, 2013 at 12:57:22PM -0400, DJ Mills wrote:
> On Thu, Aug 29, 2013 at 12:42 PM, DJ Mills 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:');
On Thu, Aug 29, 2013 at 12:42 PM, DJ Mills 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
> <>
>
> I would expect the outpu
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
<>
I would expect the output to be:
<> <>