next up previous 405
Next: Appending a counter to the input filename
Up: Filename modification
Previous: Filename modification


Appending to the input filename

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.



next up previous 405
Next: Appending a counter to the input filename
Up: Filename modification
Previous: Filename modification

C-shell Cookbook
Starlink Cookbook 4
Malcolm J. Currie
2006 November 26
E-mail:starlink@jiscmail.ac.uk

Copyright © 2013 Science and Technology Facilities Council