bug-bash
[Top][All Lists]
Advanced

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

Re: ${b+s ''}


From: Robert Elz
Subject: Re: ${b+s ''}
Date: Wed, 20 Feb 2019 09:25:24 +0700

    Date:        Tue, 19 Feb 2019 10:41:41 -0500
    From:        Greg Wooledge <address@hidden>
    Message-ID:  <address@hidden>

  | Looks like the best workaround (for bash/ksh) is to store the -d '' args
  | in an array, and use something like:
  |
  | mapfile -t ${bNullDelimited+"address@hidden"}

No, the best workaround (which will work on all shells -- that the
command used here is bash specific is really irrelevant) was given in
the original message on this topic;

        > mapfile -t${bNullDelimited+d} ${bNullDelimited+''}

That works, and works everywhere (except ksh93, which is simply
broken), but is needlessly cumbersome (and slower, as the var needs
to be looked up twice.)

kre




reply via email to

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