To help identify datasets and to indicate the processing steps used to generate them, their names are often created by appending suffices to the original file name. This is illustrated below.
foreach file (*.sdf)
set ndf = $file:r
block in=$ndf out=$ndf"_sm" accept
end
This uses block from KAPPA to perform
block smoothing on a series of NDFs, creating new NDFs,
each of which takes the name of the corresponding input NDF with a
_sm suffix. The accept keyword accepts the suggested
defaults for parameters that would otherwise be prompted. We use the
set to assign the NDF name to variable ndf for clarity.
C-shell Cookbook