On Mon, 2011-02-07 at 14:07 +0000, David Collier wrote: > I really don't want to face trying to write scripts without > functions.. and as far as I can see the ash syntax is incompatible > with the bash one, and vice-versa.
That's not true. ash supports shell functions as defined by POSIX, and so does bash. If you write POSIX standard shell scripts and use #!/bin/sh at the top, they will work correctly both on systems where /bin/sh is bash and where /bin/sh is ash [1]. Of course if you write scripts that use bash-specific syntax, rather than POSIX standard syntax, then you need to prefix your script with #!/bin/bash instead of #!/bin/sh, and obviously those scripts will not work on systems where /bin/bash is not installed/does not exist. We will just tiptoe quietly past the mess of goo on the sidewalk that is Solaris /bin/sh, and pretend we didn't notice it there. [1] Modulo bugs of course. _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
