[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Lack of documentation about mapfile callback
From: |
Chet Ramey |
Subject: |
Re: Lack of documentation about mapfile callback |
Date: |
Sat, 8 Feb 2020 22:57:13 -0500 |
User-agent: |
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:68.0) Gecko/20100101 Thunderbird/68.4.1 |
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/