Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14865 > unrolled thread

Re: Another ^A bug

Started byChet Ramey <chet.ramey@case.edu>
First post2018-11-29 15:31 -0800
Last post2018-11-29 15:31 -0800
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: Another ^A bug Chet Ramey <chet.ramey@case.edu> - 2018-11-29 15:31 -0800

#14865 — Re: Another ^A bug

FromChet Ramey <chet.ramey@case.edu>
Date2018-11-29 15:31 -0800
SubjectRe: Another ^A bug
Message-ID<mailman.4886.1543534283.1284.bug-bash@gnu.org>
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    chet@case.edu    http://tiswww.cwru.edu/~chet/

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web