1844147 Members
2792 Online
110228 Solutions
New Discussion

function in csh

 
SOLVED
Go to solution
Troyan Krastev
Regular Advisor

function in csh

Hi everyone,

Can I define a function in "csh", and can you give me an example if it is posible.

Thanks,
Troy.
3 REPLIES 3
Robin Wakefield
Honored Contributor
Solution

Re: function in csh

Hi Troy,

As such, csh functions don't exist. I think your closest bet is to use aliases. Have a look at:

ftp://ftp.oreilly.com/pub/examples/power_tools/unix/split/csh_init

for some examples.

Rgds, Robin.
harry d brown jr
Honored Contributor

Re: function in csh

I'd like to know why you want to restrict yourself to "csh", when "ksh" will do what you want?
Live Free or Die
Troyan Krastev
Regular Advisor

Re: function in csh

Thanks Robin,

Harry, I prefer to write my scripts in ksh, but this is for a colleague of mine!

Thanks.