Hi,
I have another question, I am very new to scripting. I am using c shell.
I am trying to get the length of a variable. Right now I am using
set var = 12
echo $#var
but the # operator isn't working, it is telling me that the length is 1 when it is obviously two....
From the csh manual page, you'll see that the $#varname construct gives you the number of words contained within the variable, not the number of characters, i.e.
% set blah = `echo "foo bar cog dog"`
% echo $#blah
4
I totally agree with vgersh99 - csh should not be used (wherever possible) for scripting. It is far less powerful and flexible than Bourne-based shells.