[Haifux] My "Stop Using (and Teaching) C-Shell and Tcsh" Page

Shlomi Fish shlomif at iglu.org.il
Thu Oct 18 16:19:51 MSD 2007

On Wednesday 10 October 2007, Eyal Rozenberg wrote:
> After reading Shlomi's post, I decided to ask Yechiel Kimchi about the
> C-shell issue; here's the email exchange:
> --------------------
> Hello Yechiel,
> I hadn't really given the Matam course syllabus a look since I had taken
> it (with you) in 2001, but I continue to hear the "what do they teach C
> shell for" complaint, so today I visited last semester's course website
> and C shell is still there; I checked the FAQ for an answer to the
> question and I didn't find one.
> So, if it's not too much trouble for you to answer - how come C shell is
> still taught in the course, instead of less problematic and
> actually-used scripting shells like bash or ksh? This, in light of:
> http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/
> http://www.grymoire.com/Unix/CshTop10.txt
> Of course, there's also the question of whether shell scripting should
> be at all taught as part of Matam, but that's a broader issue of what
> kinds of training should students get to work with / administer /
> program in UNIXish environments, so that's not what I'm asking
> Eyal
> PS - The answer to my question might belong in the FAQ :-)
> --------------------
> Shalom Eyal,
> First, thanks for you interet and comments.
> I'll make it short (it's 1:35am here  :-)  without looking at the
> references (sorry, I'll look at them sometime later, but I doubt they will
> change my reply).  1. C-Shell is taught as a "tool" for manipulating
> programs (in MaTaM's view, especially for testing) - this answers also the
> Q of "why scripting at all?"  

The same argument can be said in favour of Bash.

> 2. Students are not expected to become Csh 
> experts (I may agree that some technical details that are taught are not
> necessary) but they are expect to understand its usefulness. In that
> respect - any scripting language will do, even Perl.

This same argument can also be said in favour of Bash. Even more, because Bash 
is more useful than C-Shell.

> 3. AFAIK all Technion servers are csh or tcsh (I don't know whether
> they provide bash) so it is the environment we have.

So? Bash ships with Linux by default, so it's a no-brainer to install it 
there, t2 carries it and one can install it everywhere a CS student may have 
to use it.

I'm pretty sure you can change that.

> 4. Coming to think of it, the resemblance with C is an advantage
> (despite the "defects" and defects of csh).

C-shell hardly resembles "C", and there are many "faux-amis" ( 
http://en.wikipedia.org/wiki/False_friend ). For instance, C-shell has no 
curly braces ({ ... }), you cannot put arbitrary expressions inside the if 
( ... ), assignments are "set a=b" instead of "a = b", etc. I find the Bash 
syntax much more suitable for a shell, and more consistent, and think it 
would be less trouble to learn it.

So it's not a C-shell advantage either.


	Shlomi Fish

Shlomi Fish      shlomif at iglu.org.il
Homepage:        http://www.shlomifish.org/

If it's not in my E-mail it doesn't happen. And if my E-mail is saying
one thing, and everything else says something else - E-mail will conquer.
    -- An Israeli Linuxer

More information about the Haifux mailing list