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 c...@case.edu http://tiswww.cwru.edu/~chet/