set count = 1
set tempin = myndf
set box = 23
while ($count < 5)
@ box = $box - $count * 2
block in=$tempin out=tempndf box=$box
mv tempndf.sdf myndf_sm4.sdf
set tempin = myndf_sm4
@ count = $count + 1
end
This performs four block smoothing operations, with a decreasing box
size, on a NDF called myndf, the final result being
stored in the NDF called myndf_sm4. The while statement tests
a conditional statement and loops if it is true. So here it loops
whenever the value of count is less than 5.
Click here to see examples of other
operators.
% man csh
/Expressions
The box size for the smoothing is evaluated in an expression @ box = $box - $count * 2. Note the space between the @ and the variable, and the spaces around the =. Thus the box sizes will be 21, 17, 11, 3. Further details are here. You should also give the variable a value with set before assigning it an expression. Another expression increments the counter count. The NDF called tempndf is overwritten for each smooth using the standard UNIX command mv.
C-shell Cookbook