Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 25 Feb 2002 19:37:49 -0600
From:      "Mike Meyer" <mwm-dated-1015119470.cacec9@mired.org>
To:        swear@blarg.net (Gary W. Swearingen)
Cc:        questions@freebsd.org
Subject:   Re: Linux shell scripts
Message-ID:  <15482.59117.828794.86536@guru.mired.org>
In-Reply-To: <x1wux1wbp6.ux1@localhost.localdomain>
References:  <15481.41728.865317.239202@guru.mired.org> <x1wux1wbp6.ux1@localhost.localdomain>

next in thread | previous in thread | raw e-mail | index | archive | help
Gary W. Swearingen <swear@blarg.net> types:
> "Mike Meyer" <mwm-dated-1015036545.8978d2@mired.org> writes:
> > Gary W. Swearingen <swear@blarg.net> types:
> > > It's reasonable, if not ideal, to require that "bash" or even "bash2" be
> > > installed
> > Having exterminated bash on all my systems, I'd not call that
> > reasonable, much less ideal.
> Maybe "if not ideal" is not ideal writing.  You make me wonder if I
> was misinterpreted.  I tried to imply that I thought it was "not ideal"
> while actually using a non-judgemental "if".  Did you infer the opposite?
> Maybe I need to be less polite, like using "though not ideal" or "though
> hardly ideal".

Yup, I read it as just the opposite of what you meant. I thought you
meant "It's at least reasonable, and possibly ideal,...".  I can see
how it can mean what you say, though. Your alternative choices, or
possibly using "but" instead of "if" would be less ambiguous.

> > On the other hand, I never learned the
> > *scripting* features that bash has that might cause one to want to use
> > it instead of sh. On the gripping hand, anytime a script requires more
> > than one loop or conditional test, it's time to consider a real
> > scripting language, like Perl or - ideally :-) - Python.
> Care to explain why Bash is an unreasonable dependency, while Perl and
> Python (and Ruby and autoconf and libxml2 and ...) are (?) reasonable?

Perl's a special case - it's in the base system, and you can't rebuild
the system without it. Perl5.6 would fit with the rest, but not 5.005.

Bash is also a special case, because it's just sh plus features that
enhance it's usability as an interactive shell. At least, that's what
I know it for, though I haven't kept up with all the latest
features. I switched to zsh to get completion, only to be told that
bash has it now.

I feel the same way about zsh, even though it has some features that
would be useful in scripts, like multios. I'm not going to write
scripts that take advantage of multios, because their are clumsier
ways to get that result while leaving the script portable.

> I'd like to avoid Bash too, but I find it unreasonable to expect others
> to share my choice in shells.  On a practical level, how do you handle
> ports and other software that requires Bash?  Don't use the software?

First, I stretched the truth a bit. I do have a bash installed, but
it's called /compat/linux/bin/sh. I'd forgotten about that. When I
deleted the FreeBSD bash, the system just quitely did it, without
telling me that any other ports needed it.

> Work with the maintainer to eliminate the need?  Some ports that seem to
> depend on bash1 or bash2: instant-workstation, hylafax, sqsh,
> linux_base, wine, txt2regex, tex2im, linux-lesstif-ns; there are many
> fewer than I expected to find.  (Looks like I got infected via
> linux_base.)

Hmm. Possibly it's a build dependency for linux_base, because I've got
that installed.

	<mike
--
Mike Meyer <mwm@mired.org>			http://www.mired.org/home/mwm/
Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?15482.59117.828794.86536>