views:

858

answers:

6

Hello everyone,

The question is pretty self-explanatory... I am looking for websites or documentation that will teach the basics of tcsh shell programming.

Thank you

+5  A: 

I'd respectfully advice to avoid csh scripting (being csh or tcsh). While it seems attracting especially because it is close to C syntax, *csh shells have known issues, many of them are here. Both quoting and [mis–]redirection are my main gripes and that's why I moved to sh scripting (staying as close as possible to POSIX sh) and for scripts with more than 20 lines (roughly), I move to a real language (Ruby in my case).

Keltia
+1. There is really no reason one should undertake scripting for any shell aside from POSIX sh (on *nix. Plan 9 and Windows et. al. are different stories.)
Cirno de Bergerac
thanks for that link. it"s very helpful
m_oLogin
A: 

man tcsh <--- did you check here?

+1  A: 

As Ollivier said, while it was great when it first came out and had many new bells and whistles, e.g. filename completion, history, etc. But learning csh, or tcsh, is a bit redundant nowadays.

I'd spend more effort learning POSIX sh as a start and then head towards bash or zsh. You need to use POSIX sh for portability, on some systems even going back to Bourne shell (sh) for portability.

HTH

cheers,

Rob

BTW Salut Ollivier...

Rob Wells
Hi Rob, long time no see :)
Keltia
+1  A: 

I would suggest learning Csh first. You can start by reading Bill Joy's classic paper "An Introduction to the C shell". Then, move on to reading "Csh". After that, Google and practice are your best-friends.

Anthony Cuozzo
A: 

I have this O'Reilly book on the subject and find it very helpful.

unclerojelio
A: 

I found Unix Power Tools (O'Reilly) to be an awesome resource to learn any of the popular shells (bash and tcsh are what I use). The best part about this book is that each section in each chapter is actually a 1 or 2-page article that can be read and used in under 15 minutes. Each article answers a particular FAQ, so just by keeping the book on your desk, and referring to in once in a while, you end up learning a lot.

vijucat