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


Groups > gnu.bash.bug > #15879 > unrolled thread

Re: Lack of documentation about mapfile callback

Started byChet Ramey <chet.ramey@case.edu>
First post2020-02-08 22:57 -0500
Last post2020-02-08 22:57 -0500
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Lack of documentation about mapfile callback Chet Ramey <chet.ramey@case.edu> - 2020-02-08 22:57 -0500

#15879 — Re: Lack of documentation about mapfile callback

FromChet Ramey <chet.ramey@case.edu>
Date2020-02-08 22:57 -0500
SubjectRe: Lack of documentation about mapfile callback
Message-ID<mailman.537.1581220136.2412.bug-bash@gnu.org>
On 2/8/20 9:04 PM, Léa Gris wrote:
> man bash.1
>> When callback is evaluated, it is supplied the index of the next 
>> array element to be assigned and the line to be assigned to that 
>> element as additional arguments. callback is evaluated after the
>> line is read but before the array element is assigned.
> 
> I can not find real-life implementation example of the mapfile callback
> that fit the implied scenario of this behavior of invoking the callback
> before the last array entry is assigned.

The mapfile builtin originally came in to support the bash debugger; I
assume that is a good enough example.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web