I'm trying to write a simple script program (C shell). I have a problem redirecting input into a variable. Say I have a variable called J, and there is file called result which contains just some number, say 5. Which command should I use to assign J value 5 from the file result. I tried the following commands:
set J = $<result
set J = $<cat result
set J < result
and neither of these works. Please advise if you know the right commands, thanks:)