On 11/20/18 9:24 AM, Martijn Dekker wrote: > That ^A / $'\1' character just keeps causing trouble... > > This is a bug with IFS. Including a $'\1' character anywhere in IFS causes > expansions in shell assignments to discard that character. > > $ bash -c "c=$'Y\1Y'; > for IFS in $'\1' $'\2' $'x\1' $'x\2' $'\1x' $'\2x'; do > v=X\${c}X; > printf %s \"\$v\" | od -a | awk 'NR==1 { \$1=\"\"; print }'; > done"
Thanks for the report. Cases like this never come up in the real world, so edge cases like this slip by. Chet -- ``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/