Anonymous | Login | 2024-03-29 14:58 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 | ||
0000944 | [1003.1(2013)/Issue7+TC1] Shell and Utilities | Comment | Enhancement Request | 2015-05-04 21:36 | 2019-06-10 08:54 | ||
Reporter | stephane | View Status | public | ||||
Assigned To | |||||||
Priority | normal | Resolution | Accepted As Marked | ||||
Status | Closed | ||||||
Name | Stephane Chazelas | ||||||
Organization | |||||||
User Reference | |||||||
Section | sed editing commands | ||||||
Page Number | 3182 | ||||||
Line Number | 106416 | ||||||
Interp Status | Approved | ||||||
Final Accepted Text | Note: 0002720 | ||||||
Summary | 0000944: sed: relax requirement for } to be preceded by newline | ||||||
Description |
In the sed spec, we read:
And further down:
(that one being weirdly worded especially considering than neither ! nor } are clearly listed as editing commands). I've never come across a system where: sed '/foo/!{/bar/{=;=;=; };}' was not accepted. As just tested on a PDP11 emulator, the sed in Unix version 7 (where sed was first introduced) allowed it so I'd be curious to know what "historical" implementation did not allow them. Those kind of syntax are widely used. The sed FAQ has some examples with ";}" in them. I suspect the confusion may come from the fact that the last command in a command group is often a branching one (:, t, b) where semicolon is valid in the label (as per POSIX, not as per several sed implementations), but that's a limitation on ; after those commands, not ; before }. This part is also confusing:
as it's unclear what is meant by "command verbs" in the case of }. The only sensible explanation is a whole command group ({ to the matching }). As in {...;} cannot be followed by ;, but then again all implementations I tested including Unix V7 allow: sed '{=;};{=;}' |
||||||
Desired Action | Change the specification so that ; be allowed to separate commands inside a command group (though with the limitations on b, t, :, r, w and s with w flag), and that } may be preceded by ;. | ||||||
Tags | tc2-2008 | ||||||
Attached Files | |||||||
|
Relationships | |||||||||||||||||||
|
Issue History | |||
Date Modified | Username | Field | Change |
2015-05-04 21:36 | stephane | New Issue | |
2015-05-04 21:36 | stephane | Name | => Stephane Chazelas |
2015-05-04 21:36 | stephane | Section | => sed editing commands |
2015-05-04 21:36 | stephane | Page Number | => http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html#tag_20_116_13_03 [^] |
2015-05-04 21:36 | stephane | Line Number | => http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html#tag_20_116_13_03 [^] |
2015-05-05 09:14 | geoffclare | Note Added: 0002648 | |
2015-05-05 09:48 | Michael Wilson | Note Added: 0002649 | |
2015-05-05 10:14 | stephane | Note Added: 0002650 | |
2015-06-18 16:04 | eblake | Note Added: 0002719 | |
2015-06-18 16:15 | eblake | Relationship added | related to 0000262 |
2015-06-18 16:21 | geoffclare | Note Added: 0002720 | |
2015-06-18 16:22 | rhansen | Relationship added | related to 0000961 |
2015-06-18 16:23 | geoffclare | Page Number | http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html#tag_20_116_13_03 [^] => 3182 |
2015-06-18 16:23 | geoffclare | Line Number | http://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html#tag_20_116_13_03 [^] => 106416 |
2015-06-18 16:23 | geoffclare | Interp Status | => --- |
2015-06-18 16:23 | geoffclare | Final Accepted Text | => Note: 0002720 |
2015-06-18 16:23 | geoffclare | Status | New => Resolved |
2015-06-18 16:23 | geoffclare | Resolution | Open => Accepted As Marked |
2015-06-18 16:23 | geoffclare | Tag Attached: issue8 | |
2015-06-18 16:29 | geoffclare | Tag Detached: issue8 | |
2015-06-18 16:30 | geoffclare | Tag Attached: tc2-2008 | |
2015-06-18 16:36 | eblake | Relationship added | related to 0000269 |
2015-06-18 16:40 | geoffclare | Note Edited: 0002720 | |
2015-06-18 16:42 | geoffclare | Interp Status | --- => Pending |
2015-06-18 16:42 | geoffclare | Status | Resolved => Interpretation Required |
2015-06-19 07:07 | ajosey | Interp Status | Pending => Proposed |
2015-06-19 07:07 | ajosey | Note Added: 0002723 | |
2015-09-07 11:33 | ajosey | Interp Status | Proposed => Approved |
2015-09-07 11:33 | ajosey | Note Added: 0002819 | |
2019-06-10 08:54 | agadmin | Status | Interpretation Required => Closed |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |