Anonymous | Login | 2024-04-23 06:20 UTC |
Main | My View | View Issues | Change Log | Docs |
Viewing Issue Simple Details [ Jump to Notes ] | [ Issue History ] [ Print ] | ||||||
ID | Category | Severity | Type | Date Submitted | Last Update | ||
0000987 | [1003.1(2013)/Issue7+TC1] Shell and Utilities | Comment | Enhancement Request | 2015-10-08 03:05 | 2016-07-14 15:18 | ||
Reporter | dannyniu | View Status | public | ||||
Assigned To | |||||||
Priority | normal | Resolution | Rejected | ||||
Status | Closed | ||||||
Name | DannyNiu/NJF | ||||||
Organization | |||||||
User Reference | |||||||
Section | 2.2.3 Quoting | ||||||
Page Number | 2320 | ||||||
Line Number | 73612-73616 | ||||||
Interp Status | --- | ||||||
Final Accepted Text | |||||||
Summary | 0000987: Add example for quoting within command substitution within double-quotes. | ||||||
Description |
I ran into some difficulty using command substitution to obtain filenames for a command to execute, mainly because of the <space> characters in the filenames. So I sought to quote them, but in my $(cmd), there's also quoting. I thought I had to use backslash inside, which was ugly. But turns out, `$' has special meaning in double quotes, so I didn't have to quote it again. So I think an example would do a better job explaining this feature. |
||||||
Desired Action |
Add the following informative text to the end of the section. When the <double-quote> character is needed within a double-quoted string, it should be escaped by a <backslash> character. example: foo="my name is \"bar\"" However, since characters enclosed in command substitutions are not affected by double quotes, <double-quote> characters within command substitutions within double-quoted strings do not need to be escaped. example: myvar="quoted $(command "substitution example")" |
||||||
Tags | No tags attached. | ||||||
Attached Files | |||||||
|
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |