WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Alternative shells  (Read 4181 times)

Offline caminati

  • Full Member
  • ***
  • Posts: 184
    • Homepage
Alternative shells
« on: May 30, 2012, 06:34:35 AM »
I've just learnt that busybox codebase provides four different shells:

http://lists.debian.org/debian-boot/2001/07/msg00104.html

Since I like idle discussions about minimalism, I wonder if TinyCore team ever indulged in considering them as alternatives to the current ash in tcb.
There would probably be lots of compatibility troubles with current scripts...

Offline bmarkus

  • Administrator
  • Hero Member
  • *****
  • Posts: 7183
    • My Community Forum
Re: Alternative shells
« Reply #1 on: May 30, 2012, 06:42:17 AM »
You are referring to an 11 years old post. Are you sure that alternative shells still available in BusyBox?
Béla
Ham Radio callsign: HA5DI

"Amateur Radio: The First Technology-Based Social Network."

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: Alternative shells
« Reply #2 on: May 30, 2012, 06:46:38 AM »
As you like minimality why aren't you happy about ash? It's small and compatible, what else do you need?

Offline solorin

  • Full Member
  • ***
  • Posts: 184
Re: Alternative shells
« Reply #3 on: May 30, 2012, 08:50:03 AM »
. . . if you don't know, now you know. . .
        ----- R.I.P. Biggie Smalls -----

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: Alternative shells
« Reply #4 on: May 30, 2012, 09:15:19 AM »
Moving to something not-POSIX-sh-compatible doesn't really make sense for a linux distro, IMHO. I see the lesser shells as something for really minimal embedded systems, where one can afford to (re)write all scripts in that.
The only barriers that can stop you are the ones you create yourself.

Offline caminati

  • Full Member
  • ***
  • Posts: 184
    • Homepage
Re: Alternative shells
« Reply #5 on: May 30, 2012, 11:04:51 AM »
I asked the question for its own sake, and hoping to learn some interesting notion (this is appropriate for a forum, I guess); I am surely not so hopeful about further shrinking the current busybox.
That said, I object about the main point of some answers I got, that of adherence to a standard (POSIX).
First, I am not so sure that standardization is always the most critical goal.
Efficiency, neat design, modularity, etc... can conflict with that.
Secondly, compatibility should be relegated to a dedicated extension. I mean, IF it is possible to get away, in naked TCB, with a smaller (or even just somehow better, like plan9's rc), though not compatible shell, maybe it could be done, and then a separate ash.tcz be supplied for those wanting compatibility.
Others could use whatever they like: zsh, rc, pksh, or whatever.
Third, I regard some features normally included in shells as ugly duplications. For example the integer arithmetics construct $(()) can and should be replaced by a call to awk or whatever. I don't know if removing this from a shell would violate POSIX; if it did, I would like POSIX even less than I do now.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: Alternative shells
« Reply #6 on: May 30, 2012, 11:33:45 AM »
Since Busybox applications share code, using a simpler, less capable shell would likely not reduce the size.
Why fork another copy to use awk when the math code is already included for the busybox awk, and can easily be shared by $()?

Offline hiro

  • Hero Member
  • *****
  • Posts: 1229
Re: Alternative shells
« Reply #7 on: May 30, 2012, 12:50:42 PM »
I had thought about what you say and came to the conclusion that it's not worth it. A *lot* of stuff needs /bin/sh and if you were to replace all of that you could just as well write device drivers for your plan9 and ditch linux altogether.
Personally I use tinycorelinux because it allows me to use as little of the linux world as possible while still staying 99% compatible to most posix and standards considered mandatory nowadays.

If you want Plan 9 you know where to get it.