Anonymous | Login | 2025-02-11 18:27 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 | ||
0000581 | [1003.1(2008)/Issue 7] Shell and Utilities | Objection | Enhancement Request | 2012-06-15 18:20 | 2019-06-10 08:55 | ||
Reporter | schweikh | View Status | public | ||||
Assigned To | ajosey | ||||||
Priority | normal | Resolution | Accepted | ||||
Status | Closed | ||||||
Name | Jens Schweikhardt | ||||||
Organization | |||||||
User Reference | |||||||
Section | 2.10.2 Shell Grammar Rules | ||||||
Page Number | 2325pp | ||||||
Line Number | 73562-73564 (C082 this time :-) | ||||||
Interp Status | Approved | ||||||
Final Accepted Text | See Note: 0001304 | ||||||
Summary | 0000581: Grammar does not accept 'for i; do ...; done' | ||||||
Description |
The shell grammar does not accept 'for i; do ...; done' because it requires a 'linebreak' token after the 'i' token. However, existing practice of the most common shells is to accept it: $ echo 'for i; do echo $i; done' > tst.sh $ for sh in sh bash zsh ksh93 pdksh dash; do $sh -n tst.sh && echo $sh:ok; done sh:ok # FreeBSD's ash bash:ok zsh:ok ksh93:ok pdksh:ok dash:ok In order to standardize existing practice, it suffices to replace the "linebreak" with "empty or sequential_sep". This works without new conflicts. |
||||||
Desired Action |
in section 2.10.2 Shell Grammar Rules, change the for_clause in the indicated lines from for_clause : For name linebreak do_group | For name linebreak in sequential_sep do_group | For name linebreak in wordlist sequential_sep do_group ; to for_clause : For name do_group | For name sequential_sep do_group | For name linebreak in sequential_sep do_group | For name linebreak in wordlist sequential_sep do_group ; |
||||||
Tags | tc2-2008 | ||||||
Attached Files | |||||||
|
![]() |
|||
Date Modified | Username | Field | Change |
2012-06-15 18:20 | schweikh | New Issue | |
2012-06-15 18:20 | schweikh | Status | New => Under Review |
2012-06-15 18:20 | schweikh | Assigned To | => ajosey |
2012-06-15 18:20 | schweikh | Name | => Jens Schweikhardt |
2012-06-15 18:20 | schweikh | Section | => 2.10.2 Shell Grammar Rules |
2012-06-15 18:20 | schweikh | Page Number | => 2325pp |
2012-06-15 18:20 | schweikh | Line Number | => 73562-73564 (C082 this time :-) |
2012-06-15 21:27 | jilles | Note Added: 0001260 | |
2012-06-15 21:48 | Don Cragun | Note Added: 0001261 | |
2012-06-15 21:48 | Don Cragun | Note Edited: 0001261 | |
2012-06-16 09:05 | schweikh | Note Added: 0001262 | |
2012-06-16 09:08 | schweikh | Note Edited: 0001262 | |
2012-06-16 11:08 | s_mascheck | Note Added: 0001263 | |
2012-06-16 11:10 | s_mascheck | Note Edited: 0001263 | |
2012-06-20 18:10 | schweikh | Note Edited: 0001262 | |
2012-07-12 15:50 | nick | Interp Status | => --- |
2012-07-12 15:50 | nick | Note Added: 0001304 | |
2012-07-12 15:50 | nick | Status | Under Review => Interpretation Required |
2012-07-12 15:50 | nick | Resolution | Open => Accepted |
2012-07-12 15:50 | nick | Final Accepted Text | => See Note: 0001304 |
2012-07-12 15:51 | nick | Tag Attached: tc2-2008 | |
2012-07-12 15:51 | nick | Interp Status | --- => Pending |
2012-08-30 09:17 | ajosey | Note Edited: 0001304 | |
2012-08-30 09:18 | ajosey | Interp Status | Pending => Proposed |
2012-08-30 09:18 | ajosey | Note Added: 0001359 | |
2013-03-29 08:01 | ajosey | Interp Status | Proposed => Approved |
2013-03-29 08:01 | ajosey | Note Added: 0001509 | |
2019-06-10 08:55 | agadmin | Status | Interpretation Required => Closed |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |