@jilles - I see now that DASH and BASH differ on all assignments preceded
by keywords "local", "export", and "readonly". Both the DASH behaviour
and the BASH behaviour cannot be correct. I think you're trying to
tell me that DASH is working correctly and BASH is broken? I find the
behaviour of
"local" will not be removed from dash, as it is used too much, even
though it is not in POSIX.
The underlying problem is related to a feature in bash which also
applies to some POSIX special builtins (export and readonly). This
feature is not in POSIX and strictly speaking conflicts with it.
Dash
Still broken in Ubuntu 9.10
dash 0.5.5.1-2ubunt POSIX-compliant shell
$ x='1 2 3'
$ local y=$x
local: 2: 2: bad variable name
--
dash 0.5.3-5ubuntu2 variable expansion error using local
https://bugs.launchpad.net/bugs/139097
You received this bug notification because you are a member
You're right; my mistake.
My recommendation is to remove support for "local". Not only does it
not work properly, as shown by this bug, but it can cause valid POSIX
shell scripts to not behave correctly (for example, if I have a program
"local" on my PATH it is ignored by dash--"local" is not a r
An undefined feature would behave like this:
dash$ nosuch y=$x
dash: nosuch: not found
not like this:
dash$ local y=$x
local: 2: bad variable name
The dash shell is attempting to implement "local", and it's broken.
If "local" isn't part of POSIX, and dash is supposed to be POSIX, then
removing
This is not a bug. "local" is a bash-specific feature which is not
defined in the POSIX standard for sh (the POSIX shell).
If you want to run scripts that require bash-specific features, then you
should change them to use #!/bin/bash at the top; by using #!/bin/sh you
are agreeing that your shell
** Changed in: dash (Ubuntu)
Importance: Undecided => Low
Status: New => Confirmed
--
dash 0.5.3-5ubuntu2 variable expansion error using local
https://bugs.launchpad.net/bugs/139097
You received this bug notification because you are a member of Ubuntu
Bugs, which is the bug contact for
Hey! The bugs.launchpad.net bug display web page compresses whitespace.
Don't do that. I put the whitespace there to make it more readable.
Bugs should be displayed in fixed-width font with all whitespace
preserved.
--
dash 0.5.3-5ubuntu2 variable expansion error using local
https://bugs.launc
** Description changed:
- Binary package hint: dash
+ Binary package hint: dash
Linux home 2.6.20-16-generic #2 SMP Thu Jun 7 20:19:32 UTC 2007 i686
GNU/Linux
Bug in variable expansion using an assignment in "local" in dash:
$ x='1 2 3'
$ y=$x# th