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

Re: Proposed new POSIX sh policy, version two

Thomas Bushnell BSG <tb@becket.net> writes:

> On Fri, 2006-11-24 at 21:08 +0100, David Weinehall wrote:
> > You can use whatever bashisms you like when you're working
> > interactively, that won't hinder dash from executing shells on boot and
> > elsewhere.  Using bashisms in scripts does however cause a problem.
> I think it's time to realize that "bash" specifies a programming
> language, and so does "dash".
> Instead of focusing and hammering again and again on /bin/sh, why not
> instead ask maintainers to do #!/bin/dash?

Because the correct is #!/bin/sh and not to be tied on particular shell.

> > Oh, and there *are* other suitable interactive shells than bash.  tcsh,
> > ksh, zsh, rc...  Whether any of these actually consume less memory than
> > bash, I cannot say, since I'm a bash user myself on the desktop.  Yet
> > all the scripts I write run perfectly well (and faster) in dash.
> I said that dash was not a substitute for bash, by its own claim.  This
> is like a game of whackamole.  If the claim is made that dash involves
> less disk space or memory use, it's nearly irrelevant, because bash will
> be there anyway.

Bash is not there "nayway". It is posisble to substitute it for the
reasons explained (memory consumption), without any significant loss of
interactive functionality.
> There may well be advantages to dash for this or that application.  So
> then, maintainers should be encouraged to use it.  The best way, of
> course, is #!/bin/dash.

The point was making script sh-agnostic. dash is just an
implementation of sh. Someone may very well use busybox or /bin/posh.


Reply to: