The C-shells /bin/csh and /bin/tcsh does not support functions. However you can use arguments in the alias body. For example, suppose you define the following
Code:
alias silly 'echo \!:1 AND \!:2* AND \!*'
and then issue the command:
Code:
$ silly hello world hi people
hello AND world hi people AND hello world hi people
As you can see the arguments are designated as
\!:1 (the first argument),
\!:2* (from the second to the last) and
\!* (all the argument list). Note that if you don't pass a required argument, the shell complains about it. For example, using the alias above without arguments, will result in
Code:
$ silly
Bad ! arg selector.
Anyway, here is an
interesting link!
Edit: if you have to stick with a C-shell, here is some resources on csh and tcsh programming:
http://www.kitebird.com/csh-tcsh-book/