csh

Generating sequential number lists in tcsh

Hi, I've been trying to find a workaround to defining lists of sequential numbers extensively in tcsh, ie. instead of doing: i = ( 1 2 3 4 5 6 8 9 10 ) I would like to do something like this (knowing it doesn't work) i = ( 1..10 ) This would be specially usefull in foreach loops (I know I can use while, just trying to look for an a...

CSH Group Existance Test With Value Test

In CSH, is it possible to nest the test for an existance of a variable with the test for its value in the same if-clause? #!/bin/csh # This seems to work... if ( $?VAR ) then echo "VAR exists" if ( $VAR == true ) then echo "VAR is true" endif endif # I want something more like this: if (( $?VAR ) && ( $VAR ...

Failing if diff is found (c-shell)

Please resist the urge to tell me not to use c-shell. I'm writing a c-shell script and I need to run a diff between two files (generated in the script). How do I run diff and return its status (if it fails, return 1, else 0)? ...

How can I read one line at a time with C shell in unix

I try to make a small script, using c shell, that will take a file made of several lines, each containing a name and a number and sum all numbers that a have certain name. How can I put into a variable the next line each time? the summig part I do by: (after I'll be able to get a full line to $line) set line =($line) @ sum = $sum + $li...