Re: mapfile -t doesn't always remove the delimiter

2021-09-30 Thread Chet Ramey
On 9/30/21 10:50 AM, Greg Wooledge wrote: > The mapfile builtin command doesn't correctly strip delimiters (when > requested with the -t option) in all cases. Thanks for the report. It's an easy fix. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vit

mapfile -t doesn't always remove the delimiter

2021-09-30 Thread Greg Wooledge
The mapfile builtin command doesn't correctly strip delimiters (when requested with the -t option) in all cases. unicorn:~$ echo "$BASH_VERSION" 5.1.4(1)-release unicorn:~$ printf $'a\xffb\xffc\xff' | { mapfile -t -d $'\xff' array; declare -p array; } declare -a array=([0]=$'a\377' [1]=$'b\377'