Re: Which shell?
- From: Rich Teer <rich.teer@xxxxxxxxxxxxxx>
- Date: Sat, 03 Dec 2005 20:02:44 GMT
On Sat, 3 Dec 2005, Linønut wrote:
> I use bash, primarily, but the default on Solaris is sh.
>
> When writing scripts on Solaris, is it considered desirable to write it
> for the lowest-common-denominator shell (which I assume is sh)?
Yes, unless you *need* features that sh doesn't provide, in which
case ksh is the next best choice for scripting. Of course, for
your personal inetractive shell, use whatever you are comfortable
with. In your case, you'd use bash as your interactive shell, but
I recommend using sh for shell scripts.
> Or is it acceptable to include a "#!/usr/bin/bash" at the beginning of
> the script?
It is acceptable*, but not very wise. 1. you should use sh as much as
possible, and 2. there's no guarantee that bash will be installed (ksh
is more likely to be installed than bash).
* Certainly more so than assuming that sh *is* bash, as it is on
Linux for some stupid reason.
> Finally, when writing a GNU-style autoconf project, is it better to use
> a "bootstrap" script, or to use GNU autoreconf? (I'm currently doing
> the former.)
Sorry, no experience here.
--
Rich Teer, SCNA, SCSA, OpenSolaris CAB member
President,
Rite Online Inc.
Voice: +1 (250) 979-1638
URL: http://www.rite-group.com/rich
- Follow-Ups:
- Re: Which shell?
- From: Linønut
- Re: Which shell?
- From: Daniel Rock
- Re: Which shell?
- References:
- Which shell?
- From: Linønut
- Which shell?
- Prev by Date:
Re: /usr badly damaged - Next by Date:
Re: Which shell? - Previous by thread:
Re: Which shell? - Next by thread:
Re: Which shell? - Index(es):