file_description (version 1.2)
You can also look at:
#! /usr/bin/ksh
###########################################################################
#
#
# SYNTAX: file_description type
#
# DESCRIPTION: This utility gives a short phrase describing a given file type
#
# VERSION: 1.2
#
# HISTORY: 0.0 -> 1.0 8/19/96
# HISTORY: teldef now refers to both SIS and GIS files
# HISTORY: Deleted individual GIS teldef file types (eg g2onflf).
# HISTORY: 8/23/96
# HISTORY: Added scraps file type.
# HISTORY:
# HISTORY: 1.0 -> 1.1 9/11/96
# HISTORY: added totsky, corimg, expo, and totexpo
# HISTORY:
# HISTORY: 1.1 -> 1.2 9/26/96
# HISTORY: now reads from $LISTS/file_classes instead of having a big
# HISTORY: case statement
#
##############################################################################
#DEBUG=1
type="$1"
description=$(grep -v "^#" $LISTS/file_classes |grep "^${type} " | \
awk -F"|" '{print $4}' )
if [ -z "$description" ]; then
$UTIL/exception $0 1 "Unknown file type $type"
else
echo $description
fi
exit 0