[1003.1(2016/18)/Issue7+TC2 0001767]: sed: clarify behavior of c (change) command
The following issue has a resolution that has been APPLIED. == https://austingroupbugs.net/view.php?id=1767 == Reported By:mohd_akram Assigned To: == Project:1003.1(2016/18)/Issue7+TC2 Issue ID: 1767 Category: Shell and Utilities Type: Clarification Requested Severity: Editorial Priority: normal Status: Applied Name: Mohamed Akram Organization: User Reference: Section:sed Page Number:3219 Line Number:108018 Interp Status: --- Final Accepted Text: Resolution: Accepted Fixed in Version: == Date Submitted: 2023-07-18 17:45 UTC Last Modified: 2023-08-22 14:46 UTC == Summary:sed: clarify behavior of c (change) command == Issue History Date ModifiedUsername FieldChange == 2023-07-18 17:45 mohd_akram New Issue 2023-07-18 17:45 mohd_akram Name => Mohamed Akram 2023-07-18 17:45 mohd_akram Section => sed 2023-07-18 17:45 mohd_akram Page Number => 3219 2023-07-18 17:45 mohd_akram Line Number => 108018 2023-07-27 15:40 Don Cragun Interp Status => --- 2023-07-27 15:40 Don Cragun Status New => Resolved 2023-07-27 15:40 Don Cragun Resolution Open => Accepted 2023-07-27 15:41 Don Cragun Tag Attached: issue8 2023-07-27 15:42 shware_systems Note Added: 0006405 2023-08-22 14:46 geoffclare Status Resolved => Applied ==
[1003.1(2016/18)/Issue7+TC2 0001767]: sed: clarify behavior of c (change) command
A NOTE has been added to this issue. == https://austingroupbugs.net/view.php?id=1767 == Reported By:mohd_akram Assigned To: == Project:1003.1(2016/18)/Issue7+TC2 Issue ID: 1767 Category: Shell and Utilities Type: Clarification Requested Severity: Editorial Priority: normal Status: Resolved Name: Mohamed Akram Organization: User Reference: Section:sed Page Number:3219 Line Number:108018 Interp Status: --- Final Accepted Text: Resolution: Accepted Fixed in Version: == Date Submitted: 2023-07-18 17:45 UTC Last Modified: 2023-07-27 15:42 UTC == Summary:sed: clarify behavior of c (change) command == -- (0006405) shware_systems (reporter) - 2023-07-27 15:42 https://austingroupbugs.net/view.php?id=1767#c6405 -- Ed Note: The word "text" in the Desired Action is intended to stay italicized. Issue History Date ModifiedUsername FieldChange == 2023-07-18 17:45 mohd_akram New Issue 2023-07-18 17:45 mohd_akram Name => Mohamed Akram 2023-07-18 17:45 mohd_akram Section => sed 2023-07-18 17:45 mohd_akram Page Number => 3219 2023-07-18 17:45 mohd_akram Line Number => 108018 2023-07-27 15:40 Don Cragun Interp Status => --- 2023-07-27 15:40 Don Cragun Status New => Resolved 2023-07-27 15:40 Don Cragun Resolution Open => Accepted 2023-07-27 15:41 Don Cragun Tag Attached: issue8 2023-07-27 15:42 shware_systems Note Added: 0006405 ==
[1003.1(2016/18)/Issue7+TC2 0001767]: sed: clarify behavior of c (change) command
The following issue has been RESOLVED. == https://www.austingroupbugs.net/view.php?id=1767 == Reported By:mohd_akram Assigned To: == Project:1003.1(2016/18)/Issue7+TC2 Issue ID: 1767 Category: Shell and Utilities Type: Clarification Requested Severity: Editorial Priority: normal Status: Resolved Name: Mohamed Akram Organization: User Reference: Section:sed Page Number:3219 Line Number:108018 Interp Status: --- Final Accepted Text: Resolution: Accepted Fixed in Version: == Date Submitted: 2023-07-18 17:45 UTC Last Modified: 2023-07-27 15:40 UTC == Summary:sed: clarify behavior of c (change) command == Issue History Date ModifiedUsername FieldChange == 2023-07-18 17:45 mohd_akram New Issue 2023-07-18 17:45 mohd_akram Name => Mohamed Akram 2023-07-18 17:45 mohd_akram Section => sed 2023-07-18 17:45 mohd_akram Page Number => 3219 2023-07-18 17:45 mohd_akram Line Number => 108018 2023-07-27 15:40 Don Cragun Interp Status => --- 2023-07-27 15:40 Don Cragun Status New => Resolved 2023-07-27 15:40 Don Cragun Resolution Open => Accepted ==
[1003.1(2016/18)/Issue7+TC2 0001767]: sed: clarify behavior of c (change) command
The following issue has been SUBMITTED. == https://austingroupbugs.net/view.php?id=1767 == Reported By:mohd_akram Assigned To: == Project:1003.1(2016/18)/Issue7+TC2 Issue ID: 1767 Category: Shell and Utilities Type: Clarification Requested Severity: Editorial Priority: normal Status: New Name: Mohamed Akram Organization: User Reference: Section:sed Page Number:3219 Line Number:108018 Interp Status: --- Final Accepted Text: == Date Submitted: 2023-07-18 17:45 UTC Last Modified: 2023-07-18 17:45 UTC == Summary:sed: clarify behavior of c (change) command Description: There's some confusion about the behavior of the sed c (change) command. Most implementations interpret it as starting the next cycle on every line that its address range matches. Meaning, any command after it in the script is not processed. Others interpret "start the next cycle" as only occurring at the end of the address range i.e. that commands following the change command are processed except on the last line of the address range. The implementations that implement the former behavior are: - GNU sed - NetBSD sed - Busybox sed - Plan 9 sed Those that don't are: - FreeBSD sed - OpenBSD sed This has been acknowledged as a bug in FreeBSD. This was previously corrected in NetBSD with the following explanation, referencing the V7 man page: sed(1) "c" command is in some sense a shorthand for "i"+"d", so, like "d" it should start the next cycle. This is explicitly documented in v7 man page: Delete the pattern space. With 0 or 1 address or at the end of a 2-address range, place text on the output. Start the next cycle. NetBSD commit: https://gnats.netbsd.org/cgi-bin/query-pr-single.pl?number=45981 FreeBSD bug report: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271817 Desired Action: Change: Delete the pattern space. With a 0 or 1 address or at the end of a 2-address range, place text on the output and start the next cycle. To: Delete the pattern space. With a 0 or 1 address or at the end of a 2-address range, place text on the output. Start the next cycle. == Issue History Date ModifiedUsername FieldChange == 2023-07-18 17:45 mohd_akram New Issue 2023-07-18 17:45 mohd_akram Name => Mohamed Akram 2023-07-18 17:45 mohd_akram Section => sed 2023-07-18 17:45 mohd_akram Page Number => 3219 2023-07-18 17:45 mohd_akram Line Number => 108018 ==
