If you don't want to be bothered with NDF extensions, you might just want to know the value of some FITS keyword, say the exposure time, as part of your data processing. FITSLIST lists the contents of the FITS extension of an NDF or file. You can even search for keywords with grep.
% fitslist myndf | grep "ELAPSED ="
This would find the keyword ELAPSED in the FITS extension of NDF myndf. (Keywords are 8 characters long and those with values are immediately followed by an equals sign.) However, the recommended way is to use the FITSVAL command. Since this command only reports the value, it is particularly useful in scripts that need ancillary-data values during processing. The following obtains the value of keyword ELAPSED.
% fitsval myndf ELAPSED
In a script you may need to know whether the keyword exists and take appropriate action.
filterpre = `fitsexist myndf filter`
if ( $filterpre == "TRUE" ) then
filter = `fitsval myndf filter`
else
prompt -n "Filter > "
set filter = $<
endif
Shell variable filterpres would be assigned "TRUE" when the FILTER card is present, and "FALSE" otherwise. (The ` ` quotes cause the enclosed command to be executed.) So the user of the script would be prompted for a filter name whenever the NDF did not contain that information.
KAPPA --- Kernel Application Package