> > A better decision would be to write your scrips in 

> > standard-compliant shell.
> 
> OK, pardon my ignorance  then.
> 
> It seems to me that the syntax for functions in ash and bash is  different
> and incompatible.
> 

Ash is certainly not bash and you should not expect every
bash corner to be there. If you do you are in for some
surprises. Just from top of my head there are at least
these differences (probably a lot more):
 - functions, as you mention. However, you can make them like:
   test() {echo hello}  # skip "function"
 - arrays, does not exists in ash
 - pushd & popd, not in ash
 - for (( expr1; expr2; expr3 ))..., not in ash
 - parameter expansion, some more in bash than in ash
 - scope of variables (this is a killer!) All variables are global in ash
   unless declared as local. This goes for functions, loops, etc.

These are no big obsticles. Once you know about them it is easy to use
alternative solutions. What I miss most in ash is probably arrays.

Brgds
/Sven



_______________________________________________
busybox mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/busybox

Reply via email to