bug-bash
[Top][All Lists]
Advanced

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

Re: \? is missing in "3.1.2.4 ANSI-C Quoting" in Bash Reference Manual


From: Chet Ramey
Subject: Re: \? is missing in "3.1.2.4 ANSI-C Quoting" in Bash Reference Manual
Date: Thu, 3 Sep 2015 15:07:05 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

On 9/2/15 11:46 PM, ziyunfei wrote:
> Sorry, I didn't understand your reply. What I'm saying is this: \? is shown
> in printf section:
> 
> "Causes printf to expand backslash escape sequences in the corresponding
> argument, except that ‘\c’ terminates output, backslashes in ‘\'’, ‘\"’,
> and ‘\?’ are not removed, and octal escapes beginning with ‘\0’ may contain
> up to four digits.”
> 
> but it isn't documented
> in https://www.gnu.org/software/bash/manual/html_node/ANSI_002dC-Quoting.html 
> correspondingly
> after \’  and \”.

I guess I see what you're saying: that bash removes the backslash quoting
the `?' when processing $'...' but leaves backslashes escaping other
characters not listed in the description of $'...' unchanged.  I can add
that to the documentation.

If that's not what you mean, I guess I don't understand.  `printf %b'
expands one set of backslash escapes, and $'...' expands a slightly
different set, since they're trying to serve slightly different purposes
and have different origins.  They're separate constructs and are documented
separately.

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



reply via email to

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