larry priceTue Mar 15 20:35:36 PST 2005
On Tue, 15 Mar 2005 20:16:40 -0800, Jacob Meuser <jakemsr at jakemsr.com> wrote:
> On Tue, Mar 15, 2005 at 05:18:51PM -0800, Hal Pomeranz wrote:
> > Generally I agree with Allen here. The one thing I will say is that
> > if you stick with pure Bourne shell syntax then your #!/bin/sh scripts
> > will work no matter what Unix you take them to without any editing.
> > If you go with bash/ksh syntax you'll at least spend some time figuring
> > out where bash/ksh live on each new platform you go to. Not a huge
> > deal, but a minor annoyance.
>
> to me, it is a major annoyance when people write bash scripts that
> start with !#/bin/sh. it's OK to use bash extensions, just be sure
> to mark scripts as such.
I would tend to agree, I like the luxury features that bash offers
especially the readline and emacs keybindings, but I've learned that
it pays off to write scripts for /bin/sh
because they can be applied in more environments.
My general rule of thumb though is that if I'm writing something that
winds up being longer than a screen full of text I should use a
scripting language. (perl, python, php)
since that will be more maintainable.
--
http://Zoneverte.org -- information explained
Do you know what your IT infrastructure does?