"local" is a shell reserved word, isn't it?
Cristian Ionescu-Idbohrn
cristian.ionescu-idbohrn at axis.com
Sun Nov 21 23:25:54 UTC 2010
Please consider the folowing example:
,----
| #!/bin/sh
|
| set -e
| set -u
| #set -x
|
| local() {
| local local=$1
| echo "func: 'local', local var local='$local'"
| }
|
| local $LOGNAME
`----
Different shells (ash, dash, bash) handle the above in an unexpected way.
I would have expected a consistent:
foo: line 7: syntax error: bad function name
Cheers,
--
Cristian
More information about the busybox
mailing list