read_fits_keyword (version 0.0)
You can also look at:
#! /usr/bin/ksh
###########################################################################
#
#
# SYNTAX: read_fits_keyword file keyword
#
# DESCRIPTION: This utility reads a FITS keyword value and writes it to the
# standard output
#
# VERSION: 0.0
#
# HISTORY:
#
##############################################################################
file=$1
keyword=$2
if [ -z "$file" ]; then
file="undefined"
fi
if [ -z "$file" ]; then
keyword="undefined"
fi
$UTIL/setup_parfile $FTOOLS/fkeypar.par fitsfile="$file" \
keyword="$keyword"
$FTOOLS/fkeypar >stdout${$}.log 2>stderr${$}.log
code=$?
value="$($UTIL/read_parfile ./fkeypar.par value)"
value="${value#\'}"
value="${value%\'}"
echo $value
$UTIL/ftool_test fkeypar $code $0 1 stdout${$}.log stderr${$}.log
exit 0