Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > gnu.bash.bug > #11459
| Path | csiph.com!au2pb.net!usenet.blueworldhosting.com!feeder01.blueworldhosting.com!news.ripco.com!news.glorb.com!usenet.stanford.edu!not-for-mail |
|---|---|
| From | Chet Ramey <chet.ramey@case.edu> |
| Newsgroups | gnu.bash.bug |
| Subject | Re: \c-handling in $'-strings |
| Date | Wed, 2 Sep 2015 09:19:29 -0400 |
| Lines | 42 |
| Approved | bug-bash@gnu.org |
| Message-ID | <mailman.388.1441199993.19560.bug-bash@gnu.org> (permalink) |
| References | <op.x33p5xjhofd6j1@nebbiolo.upc.de> <mailman.248.1441030661.19560.bug-bash@gnu.org> <op.x4a2vqn6ofd6j1@nebbiolo.upc.de> |
| Reply-To | chet.ramey@case.edu |
| NNTP-Posting-Host | lists.gnu.org |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 7bit |
| X-Trace | usenet.stanford.edu 1441199994 27982 208.118.235.17 (2 Sep 2015 13:19:54 GMT) |
| X-Complaints-To | action@cs.stanford.edu |
| Cc | chet.ramey@case.edu |
| To | Helmut Karlowski <helmut.karlowski@ish.de>, bug-bash@gnu.org |
| Envelope-to | bug-bash@gnu.org |
| X-Enigmail-Draft-Status | N1110 |
| User-Agent | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
| In-Reply-To | <op.x4a2vqn6ofd6j1@nebbiolo.upc.de> |
| X-Junkmail-Status | score=10/60, host=mpv6.cwru.edu |
| X-Junkmail-Whitelist | YES (by domain whitelist at mpv2.tis.cwru.edu) |
| X-detected-operating-system | by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] |
| X-Received-From | 129.22.105.37 |
| X-BeenThere | bug-bash@gnu.org |
| X-Mailman-Version | 2.1.14 |
| Precedence | list |
| List-Id | Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org> |
| List-Unsubscribe | <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe> |
| List-Archive | <http://lists.gnu.org/archive/html/bug-bash> |
| List-Post | <mailto:bug-bash@gnu.org> |
| List-Help | <mailto:bug-bash-request@gnu.org?subject=help> |
| List-Subscribe | <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe> |
| Xref | csiph.com gnu.bash.bug:11459 |
Show key headers only | View raw
On 9/1/15 6:46 PM, Helmut Karlowski wrote: > Do you refer to the table titled "Circumflex Control Characters in stty"? > > It states for example: > > ? <DEL> Yeah, that's a problem. I've fixed that. > > Running: > > echo $'\c?' |od -a > echo $'\c[\c\\c]\c^\c_\c?' |od -a > > bash prints: > > 0000000 us nl > 0000002 > 0000000 esc fs c ] rs us us nl > > I'd expect: > > 0000000 del nl > 0000002 > 0000000 esc fs gs rs us del nl > > Also the ] in the output seems wrong, looks it gets the \\ wrong, though > ksh93 does this also. The Posix standardization of $'...' requires that the character after the `\c' honor backslash escaping. Since the character becomes \c\\, the subsequent `c' and `]' are literals. 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/
Back to gnu.bash.bug | Previous | Next — Previous in thread | Next in thread | Find similar
\c-handling in $'-strings "Helmut Karlowski" <helmut.karlowski@ish.de> - 2015-08-29 00:28 +0100
Re: \c-handling in $'-strings Chet Ramey <chet.ramey@case.edu> - 2015-08-31 10:17 -0400
Re: \c-handling in $'-strings "Helmut Karlowski" <helmut.karlowski@ish.de> - 2015-09-01 23:46 +0100
Re: \c-handling in $'-strings Chet Ramey <chet.ramey@case.edu> - 2015-09-02 09:19 -0400
Re: \c-handling in $'-strings "Helmut Karlowski" <helmut.karlowski@ish.de> - 2015-09-02 22:10 +0100
Re: \c-handling in $'-strings Eric Blake <eblake@redhat.com> - 2015-09-02 15:44 -0600
Re: \c-handling in $'-strings Chet Ramey <chet.ramey@case.edu> - 2015-09-03 09:58 -0400
csiph-web