Meanor, Tim writes:
>Why shouldn't he learn Bash?  All the Linux init scripts are in Bash,
>the %pre and %post scripts in RPMs are in Bash, and lots of other system
>management scripts are in Bash, so it seems like it makes more sense to
>learn Bash.

I don't know Rick's reasoning on this, but I always try to get people to
use the Bourne shell instead of bash because I'm a portability bigot.
Whenever a useful admin script gets written, someone eventually wants to
use it in some other environment, on some other flavor of UN*X.  Sometimes,
it has to be rewritten completely because Bourne shell lacks a bash feature
the original author depended on.

For scripts like this one, which is *clearly* specific to Linux under z/VM,
the portability issue isn't that important.  And it is getting so that bash
is available for almost every UN*X around (even SCO UnixWare :-).  But I
still encourage people to learn which features are specific to bash, or
they might have unpleasant surprises when they think they know how to write
Korn shell scripts, for example.

Regardless of which shell's feature set you want to write to, you MUST make
sure that the first line of your script names the correct shell!!!  I've
seen lots of scripts that have the "#!/bin/sh" line even though they use
bash-specific constructs, and that is wrong.  I notice that Jim put the
corect "#!/bin/bash" line on his script.  Good show!  Even SuSE gets the
wrong occasionally.
        - MacK.
-----
Edmund R. MacKenty
Software Architect
Rocket Software, Inc.
Newton, MA USA

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to