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

Re: curly brackets a bashism?



On Mon, Feb 11, 2002 at 08:30:56PM +0100, Josip Rodin wrote:
> > what it _really_ means is that /bin/sh should point to ash.

/bin/sh isn't even in alternatives; if ash is closer to basic sh than
bash, shouldn't it take over /bin/sh when installed?

(Of course, I always write my sh scripts for bash; there's no telling how
often I'll habitually use a bash feature.)

> > bashisms are fine, as long as you invoke bash.
> 
> It's really not worth making /bin/bash the $SHELL just for curly brackets.

What're the costs?  It's an incredibly useful notation, and it's not the
only one.

Of course, scripts intended to run under plain /bin/sh should be tested 
with a shell that actually emulates it, which bash doesn't, but I don't
see much of a gain in going through the pain of writing a shell script
without any bash extensions that's intended for use on a Debian system,
which always has bash available.

(The only thing I can see is startup speed, but if that actually becomes
an issue then it's an optimization case, which is the exception.)

-- 
Glenn Maynard



Reply to: