help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] How to set IFS temporarily? (along with assignment and a


From: Chet Ramey
Subject: Re: [Help-bash] How to set IFS temporarily? (along with assignment and array initiation)
Date: Mon, 16 Mar 2015 14:45:30 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 3/16/15 12:57 PM, Greg Wooledge wrote:
> On Mon, Mar 16, 2015 at 11:49:46AM -0500, Peng Yu wrote:
>> I'm trying to understand readarray. It can only separate elements by
>> newline. What about separating the elements by $'\0'? Is there an
>> option for this case (I don't find it in the man page)?
> 
> Unfortunately, no.  That's one of my top wishlist features.  If you
> want to read elements delimited by anything other than \n you have to
> use a loop.

Look at the devel branch.  mapfile/readarray acquired a `-d delim' option
in early July, 2015.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

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