A NOTE has been added to this issue. ====================================================================== https://austingroupbugs.net/view.php?id=1560 ====================================================================== Reported By: calestyo Assigned To: ====================================================================== Project: Issue 8 drafts Issue ID: 1560 Category: Shell and Utilities Type: Enhancement Request Severity: Editorial Priority: normal Status: New Name: Christoph Anton Mitterer Organization: User Reference: Section: 2.6.3 Command Substitution Page Number: 2323 Line Number: 74944 Final Accepted Text: ====================================================================== Date Submitted: 2022-01-31 23:30 UTC Last Modified: 2022-04-11 13:50 UTC ====================================================================== Summary: clarify wording of command substitution ====================================================================== Relationships ID Summary ---------------------------------------------------------------------- related to 0001561 clarify what kind of data shell variabl... ======================================================================
---------------------------------------------------------------------- (0005794) geoffclare (manager) - 2022-04-11 13:50 https://austingroupbugs.net/view.php?id=1560#c5794 ---------------------------------------------------------------------- Since field splitting is performed on the results of (unquoted) command substitutions, it is also affected by this issue. Suggested changes... On page 2323 line 74944 section 2.6.3 Command Substitution, change:<blockquote>replacing the command substitution (the text of the <i>commands</i> string plus the enclosing "$()" or backquotes) with the standard output of the command(s), removing sequences of one or more <newline> characters at the end of the substitution. Embedded <newline> characters before the end of the output shall not be removed; however, they may be treated as field delimiters</blockquote>to:<blockquote>replacing the command substitution (the text of the <i>commands</i> string plus the enclosing "$()" or backquotes) with the standard output of the command(s); if the output ends with one or more bytes that have the encoded value of a <newline> character, they shall not be included in the replacement. Any such bytes that occur elsewhere shall be included in the replacement; however, they might be treated as field delimiters</blockquote> On page 2325 line 75034 section 2.6.5 Field Splitting, change:<blockquote>The shell shall treat each character of the <i>IFS</i> as a delimiter</blockquote>to:<blockquote>The shell shall treat the byte sequence comprising each character of the <i>IFS</i> as a delimiter</blockquote> On page 2325 line 75038 section 2.6.5 Field Splitting, change:<blockquote>any sequence of <space>, <tab>, or <newline> characters at the beginning or end of the input shall be ignored and any sequence of those characters within the input shall delimit a field</blockquote>to:<blockquote>any sequence of bytes that have the encoded values of <space>, <tab>, or <newline> characters at the beginning or end of the input shall be ignored and any sequence of such bytes within the input shall delimit a field</blockquote> On page 2326 line 75046 section 2.6.5 Field Splitting, change:<blockquote>The term ``<i>IFS</i> white space'' is used to mean any sequence (zero or more instances) of white-space characters that are in the <i>IFS</i> value (for example, if <i>IFS</i> contains <space>/<comma>/<tab>, any sequence of <space> and <tab> characters is considered <i>IFS</i> white space).</blockquote>to:<blockquote>The term ``<i>IFS</i> white space'' is used to mean any sequence (zero or more instances) of the byte sequences that comprise white-space characters in the <i>IFS</i> value (for example, if <i>IFS</i> contains <space>/<comma>/<tab>, any sequence of bytes that have the encoded values of <space> and <tab> characters is considered <i>IFS</i> white space).</blockquote> On page 2326 line 75051 section 2.6.5 Field Splitting, change:<blockquote>Each occurrence in the input of an <i>IFS</i> character that is not <i>IFS</i> white space</blockquote>to:<blockquote>Each occurrence in the input of a byte sequence comprising an <i>IFS</i> character that is not <i>IFS</i> white space</blockquote> Issue History Date Modified Username Field Change ====================================================================== 2022-01-31 23:30 calestyo New Issue 2022-01-31 23:30 calestyo Name => Christoph Anton Mitterer 2022-01-31 23:30 calestyo Section => 2.6.3 Command Substitution 2022-01-31 23:30 calestyo Page Number => 2323 2022-01-31 23:30 calestyo Line Number => 74944 2022-04-07 16:29 geoffclare Relationship added related to 0001561 2022-04-11 13:50 geoffclare Note Added: 0005794 ======================================================================