bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: DEL character treated specially when preceded by a backslash when us


From: Chet Ramey
Subject: Re: DEL character treated specially when preceded by a backslash when used in the RHS of the regex operator ([[ $'\177' =~ $'\\\177' ]])
Date: Fri, 17 Jan 2014 08:43:46 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:24.0) Gecko/20100101 Thunderbird/24.1.1

On 1/16/14 6:46 PM, Eduardo A. Bustamante López wrote:
> The DEL ($'\177') character does not behave like the other control
> characters when used with the regex operator inside the test keyword.

This has to do with the expansion of $r and that $r includes a backslash.
When combined with the internal quoting bash does, and the fact that the
backslash is special to pattern matching, we end up with this problem.
I've only thought about it a little so far, but I don't know if there's a
quick or simple fix.  This may have to wait until after bash-4.3 is
released.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]