Often you will want to know the value of a given FITS keyword for each of a set of FITS files. It is straightforward to find the value of a keyword for a single file, but doing so manually can be tedious if have dozens (or hundreds) of files. Script fitsinfo.csh addresses this problem and gives the value of a named keyword for each of a set of FITS files.
Each FITS file is examined in turn and KAPPA application fitslist is used to list the contents of the header cards to a text file. The Unix utility grep is then used to extract the line for the required keyword from the file and this line is appended to the output file.
You give the script a list of input files (wild-cards are permitted),
the required keyword (which must be in upper case) and the name of the
output file in which the results are to be written.
The 2-D CCD Data Reduction Cookbook