Anonymous | Login | 2025-02-11 18:15 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 | ||
0000942 | [1003.1(2013)/Issue7+TC1] Shell and Utilities | Editorial | Error | 2015-04-28 21:49 | 2020-10-02 10:47 | ||
Reporter | stephane | View Status | public | ||||
Assigned To | |||||||
Priority | normal | Resolution | Accepted As Marked | ||||
Status | Closed | ||||||
Name | Stephane Chazelas | ||||||
Organization | |||||||
User Reference | |||||||
Section | expr | ||||||
Page Number | 2740-2741 | ||||||
Line Number | 89697,89702,89724,89737 | ||||||
Interp Status | --- | ||||||
Final Accepted Text | Note: 0002709 | ||||||
Summary | 0000942: Several problems in "expr" examples | ||||||
Description |
1. > The following works reliably: > > expr X$a = X= That won't work reliably if $a contains characters present in $IFS or wildcard characters. Also X$a == X= doesn't necessarily imply $a == = if there are collation elements that start with X in the locale. 2. > a=$(expr $a + 1) Missing quotes again 3. > expr "$VAR" : '.*' Fails for values of $VAR that are expr operators. |
||||||
Desired Action |
1. Quote the variable in both examples: expr "$a" = = exec "X$a" = X= 2. a=$(expr "$a" + 1) 3. expr '(' "X$VAR" : '.*' ')' - 1 |
||||||
Tags | tc2-2008 | ||||||
Attached Files | |||||||
|
![]() |
|||||||
|
![]() |
|||
Date Modified | Username | Field | Change |
2015-04-28 21:49 | stephane | New Issue | |
2015-04-28 21:49 | stephane | Name | => Stephane Chazelas |
2015-04-28 21:49 | stephane | Section | => http://pubs.opengroup.org/onlinepubs/9699919799/utilities/expr.html#tag_20_42_16 [^] |
2015-04-28 21:49 | stephane | Page Number | => http://pubs.opengroup.org/onlinepubs/9699919799/utilities/expr.html#tag_20_42_16 [^] |
2015-04-28 21:49 | stephane | Line Number | => http://pubs.opengroup.org/onlinepubs/9699919799/utilities/expr.html#tag_20_42_16 [^] |
2015-04-28 21:59 | eblake | Note Added: 0002640 | |
2015-06-11 16:13 | geoffclare | Note Added: 0002709 | |
2015-06-11 16:15 | geoffclare | Section | http://pubs.opengroup.org/onlinepubs/9699919799/utilities/expr.html#tag_20_42_16 [^] => expr |
2015-06-11 16:15 | geoffclare | Page Number | http://pubs.opengroup.org/onlinepubs/9699919799/utilities/expr.html#tag_20_42_16 [^] => 2740-2741 |
2015-06-11 16:15 | geoffclare | Line Number | http://pubs.opengroup.org/onlinepubs/9699919799/utilities/expr.html#tag_20_42_16 [^] => 89697,89702,89724,89737 |
2015-06-11 16:15 | geoffclare | Interp Status | => --- |
2015-06-11 16:15 | geoffclare | Final Accepted Text | => Note: 0002709 |
2015-06-11 16:15 | geoffclare | Status | New => Resolved |
2015-06-11 16:15 | geoffclare | Resolution | Open => Accepted As Marked |
2015-06-11 16:15 | geoffclare | Tag Attached: tc2-2008 | |
2019-06-10 08:54 | agadmin | Status | Resolved => Closed |
2020-10-02 10:47 | geoffclare | Relationship added | related to 0001407 |
Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group |