Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14794

Re: [mapfile]: problem reentrance with normal file

Path csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail
From Greg Wooledge <wooledg@eeg.ccf.org>
Newsgroups gnu.bash.bug
Subject Re: [mapfile]: problem reentrance with normal file
Date Mon, 12 Nov 2018 08:55:17 -0500
Lines 12
Approved bug-bash@gnu.org
Message-ID <mailman.3917.1542030958.1284.bug-bash@gnu.org> (permalink)
References <CACXkx7VreuDnWv8EWvCAiU0E09RRMSgXkabFP5UkBPSgzcVGRA@mail.gmail.com>
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=us-ascii
X-Trace usenet.stanford.edu 1542030959 21986 208.118.235.17 (12 Nov 2018 13:55:59 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash@gnu.org, bash@packages.debian.org
To Didou Serge <serge.didou@gmail.com>
Envelope-to bug-bash@gnu.org
Mail-Followup-To Didou Serge <serge.didou@gmail.com>, bug-bash@gnu.org, bash@packages.debian.org
Content-Disposition inline
In-Reply-To <CACXkx7VreuDnWv8EWvCAiU0E09RRMSgXkabFP5UkBPSgzcVGRA@mail.gmail.com>
User-Agent NeoMutt/20170113 (1.7.2)
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
X-Received-From 139.137.100.1
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.21
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <http://lists.gnu.org/archive/html/bug-bash/>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
Xref csiph.com gnu.bash.bug:14794

Show key headers only | View raw


On Sun, Nov 11, 2018 at 09:32:31PM +0100, Didou Serge wrote:
> When use mapfile from normal file that call function that use mapfile, the
> first mapfile lost data.
> 
> Repeat-By:
> I create 3 functions:
> ww(){ echo "$@" | mapfile -C yy -c 1 -t TT ; }

In this function, mapfile is being executed in a subshell.  It will
read the input, and then when the subshell terminates, the array will
be discarded.

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

Re: [mapfile]: problem reentrance with normal file Greg Wooledge <wooledg@eeg.ccf.org> - 2018-11-12 08:55 -0500

csiph-web