[Top][All Lists]

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

Re: mapfile callback

From: Chris F.A. Johnson
Subject: Re: mapfile callback
Date: Mon, 20 Jul 2009 02:44:29 -0400 (EDT)
User-agent: Alpine 2.00 (NEB 1167 2008-08-23)

On Mon, 20 Jul 2009, Pierre Gaston wrote:

On Mon, Jul 20, 2009 at 5:46 AM, Chris F.A. Johnson <address@hidden>wrote:

On Sun, 19 Jul 2009, Chet Ramey wrote:

 Chris F.A. Johnson wrote:

  mapfile callback code is executed in a subshell.

It's not.  It's executed in the same context as an `eval' or a trap

  So it is. Great! I wonder what I was doing wrong before.

IIRC The callback is executed before the  assignment, so you cannot
manipulate the
line currently read with it.

   True, but I call a function which works with ${array[$1-1]}.

   Chris F.A. Johnson                      <http://cfaj.freeshell.org>
   Shell Scripting Recipes: A Problem-Solution Approach (2005, Apress)

reply via email to

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