[BusyBox] experiments with sh.c
Erik Andersen
andersen at lineo.com
Sat Dec 16 23:55:32 UTC 2000
On Sat Dec 16, 2000 at 09:41:14AM -0800, larry at doolittle.boa.org wrote:
>
> I spent some airplane time with my laptop, hacking on sh.c.
> You can look at the results at http://doolittle.faludi.com/~larry/sh.c
> This version is based on 0.48, not including recent changes by
> other folks (no net access at 39,000 feet :-( ).
>
Cool! I spent the day on an airplane as well, and curiously enough I spent
several hours on sh.c as well... :-) Check this out (note that a)
if-then-else-fi is now basically working, b) when hitting return (or reading
the next line in a script) it notices what context it is in, and whines when
you make mistakes...
BusyBox v0.48 (2000.12.16-23:32+0000) Built-in shell (lash)
Enter 'help' for a list of built-in commands.
[andersen at traveller busybox]$ /bin/true; if [ $? != 0 ] ;
> then echo "hi"; else echo "bye"; fi
bye
[andersen at traveller busybox]$ if [ $? != 0 ] ; else echo "error" ; fi
sh: syntax error near unexpected token `else'
I think what I have in place builds a proper infrastructure for implementing
the rest of the logic functions (needs more testing -- esp with scripts!).
One thing that is going to be a bit of a pain is that I went through and
de-java-style-naming-ified it, so it will make integrating our two efforts a
bit tedious. I should have done it all in one pass with a perl script like
Mark did, which would greatly simplify the process... I'll try and take a
closer look over the weekend at your work (though for now I'm going to take a
nap...). My current work in progress is on my home box at
http://codepoet.org/~andersen/README.txt
-Erik
--
Erik B. Andersen email: andersen at lineo.com
--This message was written using 73% post-consumer electrons--
More information about the busybox
mailing list