|Anonymous | Login||2023-12-06 13:39 UTC|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details|
|ID||Category||Severity||Type||Date Submitted||Last Update|
|0001596||[1003.1(2016/18)/Issue7+TC2] Shell and Utilities||Objection||Clarification Requested||2022-08-03 19:18||2022-10-27 15:30|
|Final Accepted Text|
|Summary||0001596: Not one, but three expansions may create multiple fields from a single word|
Quoting lines 74743-74746: "It is only field splitting or pathname expansion that can create multiple fields from a single word. The single exception to this rule is the expansion of the special parameter '@' within double-quotes, as described in Section 2.5.2."
The last sentence is not correct. An argument that consists of an unquoted $@ or $* both initially generates one field per positional parameter. Each word is then subject to pathname expansion, field splitting and empty removal. The former two can be disabled (using `set -f` and `IFS=` respectively) but that does not cause $@ or $* to generate just one field.
$ (set -f; IFS=; set one two '' three; printf '@%s\n' $@; printf '*%s\n' $*)
|Desired Action||Replace by: "It is only field splitting or pathname expansion that can create multiple fields from a single word. However, as a special exception to this rule, the expansion of the special parameter '@' within double-quotes, as well as the expansion of the unquoted special parameters '@' or '*', may generate multiple fields as described in Section 2.5.2."|
|Tags||No tags attached.|
This problem came up during the work on bug 0001193 and is being fixed there. See Note: 0003995.
This bug should be closed as a duplicate of 1193.
|2022-08-03 19:18||McDutchie||New Issue|
|2022-08-03 19:18||McDutchie||Name||=> Martijn Dekker|
|2022-08-03 19:18||McDutchie||Organization||=> https://github.com/ksh93/ksh [^]|
|2022-08-03 19:18||McDutchie||Section||=> XCU 2.6|
|2022-08-03 19:18||McDutchie||Page Number||=> 2319|
|2022-08-03 19:18||McDutchie||Line Number||=> 74745-74746|
|2022-08-04 08:29||geoffclare||Note Added: 0005924|
|2022-08-04 08:29||geoffclare||Relationship added||duplicate of 0001193|
|2022-10-27 15:30||geoffclare||Interp Status||=> ---|
|2022-10-27 15:30||geoffclare||Status||New => Closed|
|2022-10-27 15:30||geoffclare||Resolution||Open => Duplicate|
|Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group|