"YZXIA" <yzx27@hotmail.com> writes:
> I am pretty sure C-Shell does not have the ability to create or call
> function/method/subroutine. (Correct me if I am wrong)
>
> Is there way for C-Shell to mimic the function ability? I am trying to
> avoid writing seperate C-Shell files for each function.
Very small functions can be implemented as aliases.
If you're sufficiently desperate, I suppose you can set up an array
variable to be used as a call stack, using goto statements to simulate
both calls and returns. (The label in a goto statement can be a
variable reference.)
But I really don't think it's worth the effort. I'm a tcsh user
myself, but I wouldn't recommend using it for scripting; consider
learning and using Bourne shell, or bash, or ksh, or even something
like Perl or Python.
You should read <http://www.faqs.org/faqs/unix-faq/shell/csh-whynot/>
before making a decision.
--
Keith Thompson (The_Other_Keith)
kst-u@mib.org <http://www.ghoti.net/~kst>
San Diego Supercomputer Center <*> <http://users.sdsc.edu/~kst>
We must do something. This is something. Therefore, we must do this.