[BusyBox] lash KEY=VALUE
Larry Doolittle
ldoolitt at recycle.lbl.gov
Fri Mar 16 04:29:26 UTC 2001
Andreas asked:
> [ lash doesn't understand "FOO=bar ls" or "FOO=bar" ]
> is it a bug or a missing feature? do i always have to use export when using
> variables in shell scripts?
Erik answered:
> This is a never implemented feature. No local variables in lash
> -- just environment variables. This will not be fixed, but the
> sucessor of lash, named hush, will support _full_ bourne shell
> syntax, including local variables.
All accurate, with the caveat that _full_ Bourne shell syntax
and grammar is a long way off. I don't want to even work on
functions, case statements, and a few more oddball behaviors
until the core feature set (as I see them) are well debugged.
And yes, "FOO=bar ls" (simple command environment variable
override) and "FOO=bar" (local variable assignment) are essential
parts of that core. Except for the fact that they trigger some
subtle exceptions to quoting rules, I don't even think they are
hard to implement. Grab a copy of hush, the bash man page, and
the Open Group Shell Command Language description
http://www.opengroup.org/onlinepubs/007908799/xcu/chap2.html#tag_001
and give it a try! I just linked from my page
http://doolittle.faludi.com/~larry/parser.html
to Andy Dickinson's
http://www.whydna.net/hush/
- Larry
More information about the busybox
mailing list