fail to expand/assigned subshell output into a local variable
this code snippet incorrectly fails under dash:
$ { local f=$(date); }
local: 5: 8: bad variable name
-mike== 11/8/07, Mike Frysinger ==
Quoted 1 line
this code snippet incorrectly
Why incorrectly? There's no assignments in the local. It's a built-in, thus word splitting does its job, and incorrect names, that start with digits and have other than alpha-numeric symbols, are syntax errors.
Quoted 1 line
fails under dash: $ { local f=$(date); } local: 5: 8: bad variable name
____
== 11/8/07, Oleg Verych ==
Quoted 4 lines
== 11/8/07, Mike Frysinger ==
Quoted 1 line
this code snippet incorrectly
Why incorrectly? There's no assignments in the
local.
... in the man page (and i didn't used that `feature' myself);
Quoted 1 line
It's a built-in, thus word splitting does its job,
thus, double quotes will prevent this...
Quoted 4 lines
and incorrect names, that start with digits and have other than alpha-numeric symbols, are syntax errors.
Quoted 1 line
fails under dash: $ { local f=$(date); } local: 5: 8: bad variable name
____