Anonymous | Login | 2024-03-28 18:53 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 | ||
0000832 | [1003.1(2013)/Issue7+TC1] Shell and Utilities | Objection | Clarification Requested | 2014-04-06 08:15 | 2019-06-10 08:54 | ||
Reporter | ormaaj | View Status | public | ||||
Assigned To | ajosey | ||||||
Priority | normal | Resolution | Accepted As Marked | ||||
Status | Closed | ||||||
Name | Dan Douglas | ||||||
Organization | |||||||
User Reference | |||||||
Section | 2.6.5 | ||||||
Page Number | 2333 | ||||||
Line Number | 74133 | ||||||
Interp Status | Approved | ||||||
Final Accepted Text | See Note: 0002220. | ||||||
Summary | 0000832: Clarify whether field splitting applies to arithmetic expansion | ||||||
Description |
The first paragraph of section 2.6.5 states that after parameter expansion, command substitution, and arithmetic expansion, field splitting should apply to unquoted expansions and substitutions. That sentence could be interpreted as either referring to arithmetic expansion only with regards to the order of operations, or to imply that field splitting should apply to the results. The subsequent sentence beginning on line 74136 then refers only to parameter expansion and command substitution without being explicit about whether that should exclude arithmetic expansion. Many but not all current implementations do appear to apply field splitting to the results of arithmetic expansion per the following testcase: #!/bin/sh code='${ZSH_VERSION+false} || emulate sh ${BASH_VERSION+set -o posix} IFS=0 printf "<%s> " $((1230456))' for sh in bash zsh ksh mksh posh dash bb; do printf '%-7s %s\n' "${sh}:" "$("$sh" -c "$code")" done Which produces: bash: <123> <456> zsh: <1230456> ksh: <123> <456> # AT&T ksh mksh: <1230456> posh: <1230456> dash: <123> <456> bb: <123> <456> # Busybox ash |
||||||
Desired Action |
Improve the wording so that either: a) Field splitting is either explicitly required or explicitly disallowed on arithmetic expansion. b) Field splitting is explicitly unspecified for arithmetic expansion. |
||||||
Tags | tc2-2008 | ||||||
Attached Files | |||||||
|
Issue History | |||
Date Modified | Username | Field | Change |
2014-04-06 08:15 | ormaaj | New Issue | |
2014-04-06 08:15 | ormaaj | Status | New => Under Review |
2014-04-06 08:15 | ormaaj | Assigned To | => ajosey |
2014-04-06 08:15 | ormaaj | Name | => Dan Douglas |
2014-04-06 08:15 | ormaaj | Section | => 2.6.5 |
2014-04-06 08:15 | ormaaj | Page Number | => 2333 |
2014-04-06 08:15 | ormaaj | Line Number | => 74133 |
2014-04-07 15:15 | geoffclare | Project | 2008-TC1 => 1003.1(2013)/Issue7+TC1 |
2014-04-10 15:40 | Don Cragun | Interp Status | => Pending |
2014-04-10 15:40 | Don Cragun | Note Added: 0002220 | |
2014-04-10 15:40 | Don Cragun | Status | Under Review => Interpretation Required |
2014-04-10 15:40 | Don Cragun | Resolution | Open => Accepted As Marked |
2014-04-10 15:41 | Don Cragun | Final Accepted Text | => See Note: 0002220. |
2014-04-10 15:44 | Don Cragun | Tag Attached: tc2-2008 | |
2014-04-10 15:50 | Don Cragun | Note Edited: 0002220 | |
2014-05-02 09:27 | ajosey | Interp Status | Pending => Proposed |
2014-05-02 09:27 | ajosey | Note Added: 0002243 | |
2014-06-25 10:13 | ajosey | Interp Status | Proposed => Approved |
2014-06-25 10:13 | ajosey | Note Added: 0002278 | |
2019-06-10 08:54 | agadmin | Status | Interpretation Required => Closed |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |