A NOTE has been added to this issue. ====================================================================== http://austingroupbugs.net/view.php?id=985 ====================================================================== Reported By: rhansen Assigned To: ====================================================================== Project: 1003.1(2013)/Issue7+TC1 Issue ID: 985 Category: Shell and Utilities Type: Omission Severity: Objection Priority: normal Status: Under Review Name: Richard hansen Organization: BBN User Reference: Section: 2.6.2, 2.9.4.3 Page Number: 2328, 2345 Line Number: 73944-73945, 74602-74603 Interp Status: Approved Final Accepted Text: http://austingroupbugs.net/view.php?id=985#c2885 ====================================================================== Date Submitted: 2015-09-17 19:22 UTC Last Modified: 2018-04-17 13:46 UTC ====================================================================== Summary: quote removal missing from case statement patterns and alternative expansions ====================================================================== Relationships ID Summary ---------------------------------------------------------------------- related to 0000221 poor wording about even quotes in doubl... related to 0000249 Add standard support for $'...' in shell ======================================================================
---------------------------------------------------------------------- (0003970) joerg (reporter) - 2018-04-17 13:46 http://austingroupbugs.net/view.php?id=985#c3970 ---------------------------------------------------------------------- In the Bourne Shell and in ksh88, the case statement first tries to match the case argument against the pattern using gmatch() and in case this does not result in a match, the quoting on the pattern is removed and a plain string compare is done. In case if the example from the "Description", the case argument is the C string "foo bar" and the pattern is the C string "\\f\\o\\o\\ \\ \\b\\a\\r" that yields in the string: \f\o\o\ \ \b\a\r gmatch("foo bar", "\\f\\o\\o\\ \\ \\b\\a\\r") gives a match. If this did not result in a match, quotes in the pattern would be removed and strcmp() called with the "case" argument and the pattern with it's quoting removed. This results in a call to: strcmp("foo bar", "foo bar") that also gives a match. Issue History Date Modified Username Field Change ====================================================================== 2015-09-17 19:22 rhansen New Issue 2015-09-17 19:22 rhansen Name => Richard hansen 2015-09-17 19:22 rhansen Organization => BBN 2015-09-17 19:22 rhansen Section => 2.6.2, 2.9.4.3 2015-09-17 19:22 rhansen Page Number => 2328, 2345 2015-09-17 19:22 rhansen Line Number => 73944-73945, 74602-74603 2015-09-17 19:22 rhansen Interp Status => --- 2015-09-17 19:23 rhansen Desired Action Updated 2015-09-17 19:24 rhansen Desired Action Updated 2015-09-18 08:34 geoffclare Relationship added related to 0000221 2015-09-18 08:39 geoffclare Note Added: 0002835 2015-09-18 20:08 shware_systems Note Added: 0002839 2015-09-18 20:18 shware_systems Note Edited: 0002839 2015-10-01 18:29 rhansen Note Added: 0002852 2015-10-02 08:45 geoffclare Note Added: 0002853 2015-10-02 17:13 rhansen Note Added: 0002855 2015-10-03 00:57 shware_systems Note Added: 0002856 2015-10-04 07:52 geoffclare Note Added: 0002858 2015-10-08 16:14 rhansen Note Added: 0002863 2015-10-08 16:31 rhansen Note Added: 0002864 2015-10-08 16:40 geoffclare Note Added: 0002865 2015-10-08 16:41 rhansen Relationship added related to 0000249 2015-10-08 20:39 shware_systems Note Added: 0002866 2015-10-15 15:55 geoffclare Note Edited: 0002863 2015-10-15 15:56 geoffclare Note Edited: 0002865 2015-10-15 15:59 geoffclare Note Added: 0002876 2015-10-15 16:00 geoffclare Interp Status --- => Pending 2015-10-15 16:00 geoffclare Final Accepted Text => bugnote:2876 2015-10-15 16:00 geoffclare Status New => Interpretation Required 2015-10-15 16:00 geoffclare Resolution Open => Accepted As Marked 2015-10-15 16:01 geoffclare Tag Attached: tc3-2008 2015-11-05 17:09 rhansen Final Accepted Text bugnote:2876 => 2015-11-05 17:09 rhansen Note Added: 0002884 2015-11-05 17:09 rhansen Status Interpretation Required => New 2015-11-05 17:09 rhansen Resolution Accepted As Marked => Open 2015-11-05 17:17 rhansen Note Added: 0002885 2015-11-05 17:21 rhansen Note Edited: 0002885 2015-11-05 17:22 geoffclare Note Deleted: 0002876 2015-11-05 17:23 geoffclare Final Accepted Text => http://austingroupbugs.net/view.php?id=985#c2885 2015-11-05 17:23 geoffclare Status New => Interpretation Required 2015-11-05 17:23 geoffclare Resolution Open => Accepted As Marked 2016-12-15 18:11 ajosey Interp Status Pending => Proposed 2016-12-15 18:11 ajosey Note Added: 0003522 2017-01-18 15:24 ajosey Interp Status Proposed => Approved 2017-01-18 15:24 ajosey Note Added: 0003550 2018-04-11 15:54 geoffclare Note Added: 0003947 2018-04-11 15:54 geoffclare Status Interpretation Required => Under Review 2018-04-11 15:54 geoffclare Resolution Accepted As Marked => Reopened 2018-04-12 08:11 geoffclare Note Added: 0003948 2018-04-17 13:46 joerg Note Added: 0003970 ======================================================================