* fail to expand/assigned subshell output into a local variable
@ 2007-11-08 22:07 Mike Frysinger
2007-11-08 22:27 ` Oleg Verych
0 siblings, 1 reply; 3+ messages in thread
From: Mike Frysinger @ 2007-11-08 22:07 UTC (permalink / raw)
To: dash
[-- Attachment #1: Type: text/plain, Size: 108 bytes --]
this code snippet incorrectly fails under dash:
$ { local f=$(date); }
local: 5: 8: bad variable name
-mike
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: fail to expand/assigned subshell output into a local variable
2007-11-08 22:07 fail to expand/assigned subshell output into a local variable Mike Frysinger
@ 2007-11-08 22:27 ` Oleg Verych
2007-11-08 23:01 ` Oleg Verych
0 siblings, 1 reply; 3+ messages in thread
From: Oleg Verych @ 2007-11-08 22:27 UTC (permalink / raw)
To: Mike Frysinger; +Cc: dash
== 11/8/07, Mike Frysinger ==
> 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.
> fails under dash: $ { local f=$(date); } local: 5: 8: bad variable name
____
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: fail to expand/assigned subshell output into a local variable
2007-11-08 22:27 ` Oleg Verych
@ 2007-11-08 23:01 ` Oleg Verych
0 siblings, 0 replies; 3+ messages in thread
From: Oleg Verych @ 2007-11-08 23:01 UTC (permalink / raw)
To: Mike Frysinger; +Cc: dash
== 11/8/07, Oleg Verych ==
> == 11/8/07, Mike Frysinger ==
> > 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);
> It's a built-in, thus word splitting does its job,
thus, double quotes will prevent this...
> and incorrect names, that start with digits and have other than
> alpha-numeric symbols, are syntax errors.
>
> > fails under dash: $ { local f=$(date); } local: 5: 8: bad variable name
____
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-11-09 1:40 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-08 22:07 fail to expand/assigned subshell output into a local variable Mike Frysinger
2007-11-08 22:27 ` Oleg Verych
2007-11-08 23:01 ` Oleg Verych
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox