Apps :: Busybox



Quote
Or perhaps the fact that busybox can also be compiled so that it can be a shell? (iirc ash)
I didn't know that. This bit of info is plenty to make the original question a possible "yes" or "no" in some cases.

I'm guessing some commands don't work as they were added in Bash 3.0 and DSL has 2.04. For example this needs the newer bash:
Quote
echo {1..3}

DSL (4.x anyway) has Bash version 2.05b, which has been used in practically every distro for years. Only recently as version 3 been becoming common.

I can't think of any situation that isn't distro-specific where Bash 3 commands are used yet.  Generally I'd encourage not using Bash-specific (much less Bash-version-specific) commands for anything but personal scripts or those that are written specifically for a system with Bash3 as the default. Anything you can do with Bash3 can be done with other bourne-compatible shells, just not always in the same way.

Bash built-ins might make things easier for the individual user, but they make things more complicated when you try to write for multiple users of multiple systems. sh is available in *every* Linux system (except maybe for a few that are custom-built, but the users of those had better know something about their shell). If you make any script that you hope to be portable to another distro, you definitely should stick to pure bourne.

I agree with you mikshaw.  Afaik certain shell-specific built-ins can take up more resources too.  For larger, mainstream distros I think I've seen bash v3 become the standard over ~2 years or so.

For DSL, I played around with replacing bash entirely by a replacement (bourne) sh shell, but I forget whether I posted about the idea of replacing bash v2 in the base DSL.  Could be that I didn't because there was an existing thread or that I had no "real" benchmark (perhaps Curaga's thread on bootchart would help here).  In any case, I am pushing the idea out here.  Didn't do much testing though.

A real-world distro example would be how Ubuntu included 'dash' in edgy - iirc it's a BSD port and is what /bin/sh defaults to.  For now, all I can say that it requires fewer libs and is smaller in size, and that it could result in speed-ups.  Saying that, it does have it's own problems and differences from my experience with it.

So if someone wanted a solid list of what we are using, I'm using DSL 4.2.5, is there a better list of the commands and their clear usage or could that someone just muddle thru with the basic Bash commands?  I have seen quite a few "Bash" commands that don't work in dsl, that's why I'm asking.
Next Page...
original here.