On 9/16/07, Roger Marquis <[EMAIL PROTECTED]> wrote:
> Brandorr wrote:
> > ===Q: Why doesn't /bin/sh point to bash?===
> > A: Solaris uses the Bourne shell (/bin/sh) as the default system shell
> > to satisfy backward compatibility with historic releases of Solaris.
> > There is work being planned to replace the Bourne shell with a generic
> > POSIX compliant shell. Whether that is an updated bash running in
> > POSIX compatibility mode, or another shell such as ksh93 is still an
> > open question. Either option require additional coding resources to
> > implement.
>
> The default system shell, as specified in /etc/passwd, is used _only_ for
> command line access. As such it really should be something more modern than
> Bourne's sh. The default script shell, OTOH, is and always has been
> /bin/sh. Hard to see any case for changing that (from a posix-compliant
> version, not that I'm a fan of posix. Few organizations have been as
> unfriendly to backwards-compatibility as posix).
>
> > ===Q: Why isn't bash the default system shell?===
> > A: There is a consensus building to use a modern/user-friendly default
> > system shell, such as bash or ksh93, but the integration and
> > compatibility changes required have yet to be done.
>
> A consensus for ksh? Among what audience? Couldn't be the vast majority of
> potential OpenSolaris users, currently about running bash (90%) and tcsh
> (9%), in Linux and *BSD respectively.
Neither Opensolaris nor project Indiana are Project Copy Linux
Mistakes, and these mistakes include the use of bash as default shell.
I think Indiana wants to make it better and that includes the default
shell. ksh93 is superior in functionality, performance and usability
compared to bash.
A few numbers:
$ time bash -c 'i=0 ; s="" ; while [ $i -lt 10000 ] ; do i=$((i+1)) ;
s="$(echo ${s}x)" ; done'
real 1m40.230s
user 1m10.660s
sys 0m7.548s
$ time ksh93 -c 'i=0 ; s="" ; while [ $i -lt 10000 ] ; do i=$((i+1)) ;
s="$(echo ${s}x)" ; done'
real 0m11.947s
user 0m8.641s
sys 0m1.540s
ksh93 is much faster (10x) and has many features like arrays which
take strings as index, structures, floating point math, fully
implements and conforms the POSIX sh standard and the version which is
integrated into Solaris B72 includes a 64bit binary to deal with more
than 4GB of data. And Roland Mainz wrote a cool TAB completion feature
which makes bash look like the obsolete Bourne shell.
> IMO, Sun's current market share (in the low single digits) is due to a
> persistent disregard for cross-platform compatibility. Religious arguments
> aside, making ksh the default anything will only have a negative impact on
> compatibility, and market share.
Nice try. We have people in the community who run ksh93 as /bin/sh on
a regular basis and nothing breaks. I've tried the same with bash and
the first thing I saw upon boot were bash syntax errors sprinkled all
over the system console
Bruno
_______________________________________________
indiana-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/indiana-discuss