On Sun, Jul 09, 2006, Amos Shapira wrote about "Re: good book in tcsh shell 
programming.":
> On 09/07/06, Shlomi Fish <[EMAIL PROTECTED]> wrote:
> >but also the CS one to teach bash programming instead of csh programming:
> 
> If you go through all this to convince them to switch - I think you'll
> do them a greater favour by convincing them to switch to standard
> Bourne Shell[1] rather than learn to rely on Bash - it will ensure
> greater standard-compliance and portability[2].

The original "Bourne Shell" was released in 1977, almost 30 years ago.
I am not aware of any "standard" bourne shell other than this antique.
The question is, why limit yourself to teaching a 30 year old fossil?
When I learned Unix 21 years ago (in 1985), Bourne Shell was already long
in the tooth, and better shells like Korn Shell (ksh) already existed.
Even later, shells like Bash and Zsh appeared.

It is worth knowing which shell features are specific to a certain shell
and which are the original bash, e.g., for writing portable shell scripts,
but I think it's important to teach some of the ksh/bash/zsh features
that were missing in the original Bourne Shell, including functions, aliases,
job control, history, completion, and so on.

Note that learning shell syntax is a far-cry from being able to write
portable shell scripts. A far more difficult issue is compatibility issues
with the external commands you need to run. Should you write 'echo -n hello'
or 'echo "hello\c"'? Is a certain command available for use? Which command
flags are GNU extensions and will not be found on traditional Unix systems?

Please also note that a quick Googling shows that POSIX chose as its
standard shell the Korn shell, and NOT the Bourne shell. Check out for
example http://docs.hp.com/en/B2355-90046/ch15s03.html,

> They can learn, as an addendum, to use Bash interactive features and
> sugar toppings, but "don't put a barrier in front of a blind man" like
> MS does by injecting non-standard features without making them aware
> of that (cf HTML, JavaScript, C++, and what they tried to do to Java).

A standard is needed, yes. But the 30 year old Bourne shell is too old...

By the way, don't forget that many people switched from Bourne Shell
to Tcsh because they wanted the interactive features. It's important
to show them that they can get the both of these worlds: with ksh,
bash or zsh, they can have all of Bourne shell's and Tcsh's advantages,
and then some.

-- 
Nadav Har'El                        |       Sunday, Jul 9 2006, 13 Tammuz 5766
[EMAIL PROTECTED]             |-----------------------------------------
Phone +972-523-790466, ICQ 13349191 |"A witty saying proves nothing." --
http://nadav.harel.org.il           |Voltaire

=================================================================
To unsubscribe, send mail to [EMAIL PROTECTED] with
the word "unsubscribe" in the message body, e.g., run the command
echo unsubscribe | mail [EMAIL PROTECTED]

Reply via email to