Closed Niols closed 5 years ago
The first form is accepted by dash, bash and zsh. So I guess morbig should do the same, especially if we consider the following paragraph of the standard:
Within the backquoted style of command substitution, <backslash> shall retain its literal meaning,
except when followed by: '$', '`', or <backslash>. The search for the matching backquote shall be
satisfied by the first unquoted non-escaped backquote; during this search, if a non-escaped backquote
is encountered within a shell comment, a here-document, an embedded command substitution of the
$(command) form, or a quoted string, undefined results occur. A single-quoted or double-quoted string
that begins, but does not end, within the "`...`" sequence produces undefined results.
which seems to state that this an unspecified situation.
On:
Morbig outputs:
While Dash accepts the script.
Interestingly, with
$( ... )
, Morbig has the same behaviour (same error) but Dash rejects the script with:What do you think, should that be accepted or rejected in Morbig? I believe that in any case, it can be seen as a bug in Dash.