View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0000459 | 1003.1(2008)/Issue 7 | Shell and Utilities | public | 2011-06-05 15:26 | 2013-04-16 13:06 |
Reporter | calestyo | Assigned To | ajosey | ||
Priority | normal | Severity | Editorial | Type | Clarification Requested |
Status | Closed | Resolution | Accepted As Marked | ||
Name | Christoph Anton Mitterer | ||||
Organization | |||||
User Reference | |||||
Section | shift | ||||
Page Number | 2364 | ||||
Line Number | 74748-74750 | ||||
Interp Status | Approved | ||||
Final Accepted Text | 0000459:0000858 | ||||
Summary | 0000459: clarification on the value of n for the shift built-in command | ||||
Description | Hi. With respect to http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=627856 ... could you please clarify, whether it is "allowed" to specify values n > $# to the shift special built-in or not or whether the results are undefined. I'd say that it is allowed and exit status > 0 should be returned. Cheers, Chris. | ||||
Desired Action | Clarification | ||||
Tags | tc1-2008 |
|
Interpretation response ------------------------ The standard is unclear on this issue, and no conformance distinction can be made between alternative implementations based on this. This is being referred to the sponsor. Rationale: ------------- None. Notes to the Editor (not part of this interpretation): ------------------------------------------------------- In the EXIT STATUS section change: The exit status is >0 if n>$#; otherwise, it is zero. to: If the n operand is invalid or is greater than $#, this may be considered a syntax error and a non-interactive shell may exit; if the shell does not exit in this case, a non-zero exit status shall be returned. Otherwise, zero shall be returned. |
|
Uhm why not just clarfying this in the next version of the standard? |
|
There is no reason to wait for the next revision of the standard to make this change. The change will not break any existing implementation and clarifies that invoking shift x (where x is an integral value larger than $#) is an error that may, but need not, be considered a syntax error. In this case it is unspecified whether or not a non-interactive shell will quit when this error is detected. |
|
Interpretation proposed 10 August 2011 for final 30 day review |
|
Interpretation approved 12 Sept 2011 |
Date Modified | Username | Field | Change |
---|---|---|---|
2011-06-05 15:26 | calestyo | New Issue | |
2011-06-05 15:26 | calestyo | Status | New => Under Review |
2011-06-05 15:26 | calestyo | Assigned To | => ajosey |
2011-06-05 15:26 | calestyo | Name | => Christoph Anton Mitterer |
2011-06-05 15:26 | calestyo | Section | => ? |
2011-06-05 15:26 | calestyo | Page Number | => ? |
2011-06-05 15:26 | calestyo | Line Number | => ? |
2011-06-15 15:37 | Don Cragun | Section | ? => shift |
2011-06-15 15:37 | Don Cragun | Page Number | ? => 2364 |
2011-06-15 15:37 | Don Cragun | Line Number | ? => 74748-74750 |
2011-06-15 15:37 | Don Cragun | Interp Status | => --- |
2011-06-16 15:28 | geoffclare | Interp Status | --- => Pending |
2011-06-16 15:28 | geoffclare | Note Added: 0000858 | |
2011-06-16 15:28 | geoffclare | Status | Under Review => Interpretation Required |
2011-06-16 15:28 | geoffclare | Resolution | Open => Accepted As Marked |
2011-06-16 15:30 | geoffclare | Final Accepted Text | => 0000459:0000858 |
2011-06-16 15:31 | geoffclare | Tag Attached: tc1-2008 | |
2011-06-30 22:29 | calestyo | Note Added: 0000879 | |
2011-06-30 23:27 | Don Cragun | Note Added: 0000880 | |
2011-08-10 15:23 | ajosey | Interp Status | Pending => Proposed |
2011-08-10 15:23 | ajosey | Note Added: 0000930 | |
2011-09-12 15:22 | ajosey | Interp Status | Proposed => Approved |
2011-09-12 15:22 | ajosey | Note Added: 0000962 | |
2013-04-16 13:06 | ajosey | Status | Interpretation Required => Closed |