bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Empty trailing fields ignored by read


From: Greg Wooledge
Subject: Re: Empty trailing fields ignored by read
Date: Thu, 29 Aug 2013 14:54:19 -0400
User-agent: Mutt/1.4.2.3i

On Thu, Aug 29, 2013 at 12:57:22PM -0400, DJ Mills wrote:
> On Thu, Aug 29, 2013 at 12:42 PM, DJ Mills <danielmills1@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> <>

Looks like:
http://lists.gnu.org/archive/html/bug-bash/2008-02/msg00056.html

There may be other occurrences.  I seem to recall something more recent
than 2008.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]