Hi.
I'm writing a shell script using tcsh - I have no choice in the matter; I'm utilising GMT (Generic Mapping Tools) which only runs from csh/tcsh.
In bash the
read command is simple.
I'm having a bit of difficulty with it's counterpart in tcsh...
What I'm tring to do is to assign the number of lines in a file to a variable var
Code:
@ var = (wc -l file | awk '{print $1}' )
the
@ is the
set equivalent for numerical characters
but tcsh doesn't like this...
so I try the long way around:
Code:
wc -l file | awk '{print $1}' > temp.file
**READ** var < temp.file
- but I don't know the tcsh read syntax. It's something like $< but that's all I can get...
Would appreciate any help