[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: ash vs. bash



On Mon, Jul 19, 1999 at 10:16:28PM -0500, Steve Greenland wrote:
 (...)
 >#1 is what lets us change the default /bin/sh to any posix compliant sh.
 >If ash provides this, cool. But you can't just yank bash off the system
 >and expect things to work. And I don't see a *significant* benefit in
 >doing so. 

Any time a program makes a system(3) call it would benefit from having
/bin/sh linked to /bin/ash as opposed to /bin/bash. Whenever you run
a system command from any common scripting language (Perl, AWK, ...)
you fork "/bin/sh -c ...". Furthermore, the switch would force people
to actually write POSIX compliant shell scripts without using bashisms
unless they explicitly whant to do that, in which case they should
start them with #!/bin/bash. On small resource-constrained machines
(386) several people are alreading using ash as the default shell
for scripts, as it offers a much smaller memory footprint than bash,
starts and executes faster. On the other hand I do not think that anybody
would like to use ash for interactive work.

The performance gain is especially evident when you pipe several shell
scripts together, i.e. script1 | script2 | script3 | ... , which is
a paradigm that I use a lot. And, as a matter of tastes, I do not like
over-bloated shells, as the shell programming paradigm relies on fast,
external utilities. If I wanted an all-in-one programming language I
would use Perl, Tcl, or one of the countless others. But this is just
my opinion, of course.

bye
-- 
Carlo Strozzi       PGP Public Key fingerprint :
ED 4A 7A 6C 88 66 1B 34  06 14 FC 2E C7 EA F2 EE

Against software patents: http://no-patents.prosa.it


Reply to: