Hello guys,
A quick CSH question. I'm trying to run wc -l on a file. I want to get this line count on to a variable in my csh script. I'm not doing it right.
This is what i've tried to no avail:
Code:
1.) set numlinks = `cat` $file | wc -l
2.) numlinks = `cat` $file | wc -l
$file comes from a foreach loop. $file is ok because if I just run 'cat' $file | wc -l, it prints out the correct amount of lines.
Once I get this count into a variable I want to do some arithmetic on it. First time writing shell scripts by the way, so excuse my ignorance.
Thanks for any help,
vxc