-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 1/9/13 1:49 PM, Dan Douglas wrote: > Hi. These were easy for me to reproduce in various versions. > > Export to mapfile the variable to be assigned, then run any callback: > $ printf '%s\n' {a..z} | bash -xc 'a= mapfile -tc1 -C : a' > + a= > + mapfile -tc1 -C : a > ++ : 0 a > Segmentation fault
Thanks for the report. This one was easy to fix. The basic idea is that mapfile needs to treat its temporary environment the way the eval and source builtins do, since it uses the internal equivalent of eval to execute callbacks internally. > There were others, mostly to do with modifying the variable being mapped. These all fall into the category of bash letting you shoot yourself, if you are determined to do so. Chet - -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, ITS, CWRU c...@case.edu http://cnswww.cns.cwru.edu/~chet/ -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (Darwin) Comment: GPGTools - http://gpgtools.org Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlDyChoACgkQu1hp8GTqdKtq4wCfYUmZutsjdZ7rdZibbR8QPzv1 mn4An2Inr6XhoZCp9mjQeuBqSAiQuD/+ =Jnhd -----END PGP SIGNATURE-----