trend_class (version 1.3)
You can also look at:
#! /usr/bin/ksh
###########################################################################
#
#
# SYNTAX: trend_class type
#
# DESCRIPTION: This utility returns the file class for a given file type
# the file class determines which directory it will end up in.
#
# VERSION: 1.3
#
# HISTORY: 0.0 -> 1.0 8/19/96
# HISTORY: jobpar now has class jobpar
# HISTORY: 8/23/96 added scraps file
# HISTROY:
# HISTORY: 1.0 -> 1.1 9/11/96
# HISTORY: added totexpo and totsky, changed gif class to gif1plus
# HISTORY:
# HISTORY: 1.1 -> 1.2 9/19/96
# HISTORY: added corimg
# HISTORY:
# HISTORY: 1.2 -> 1.3 9/26/96
# HISTORY: Now reads from $LISTS/file_classes file instead of having
# HISTORY: a big case statement
#
##############################################################################
#DEBUG=1
type=$1
class=$(grep -v "^#" $LISTS/file_classes |grep "^${type} " | \
awk -F"|" '{print $3}' )
if [ -z "$class" ]; then
$UTIL/exception $0 1 "Unknown file type $type"
else
for word in $class; do
echo $word
done
fi
exit 0