On 2/26/15 1:01 PM, Chet Ramey wrote: > On 2/26/15 8:20 AM, Corentin Peuvrel wrote: >> Hello, >> >> I found a bug in bash-4.1 (CentOS 6) that was fixed (at least) in bash-4.3 >> (Fedora 21). >> >> $ foo=aXb ; echo "$BASH_VERSION : ${foo/X/\'}" >> 4.3.33(1)-release : a'b >> >> $ foo=aXb ; echo "$BASH_VERSION : ${foo/X/\'}" >> 4.1.2(1)-release : a\'b >> >> The shell substitution add the backslash before the quote, but it shouldn't >> (and ${foo/X/'} fail because it wait for an ending quote). >> >> I was wondering if it was possible to backport a fix in 4.1 ? > > No. The changes were pretty extensive, and I don't have the time > it would take to port them two versions back. > > You can read the rationale for the changes in all its glory at > > http://austingroupbugs.net/view.php?id=221
Sorry, I should have added that you can work around this by using a shell variable, as another poster suggested. -- ``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/