#!/bin/sh # assign [-] searchstring # where term is f9 or s9 for spring or fall term # right now, there can be at most one - and exactly one searchstring FILERT=/home/shapiro/adm/doc/dept/ FILE=${FILERT}assign.now if [ "$#" = "0" ] ; then echo usage: ${0} [-f93] searchstring, or some other term exit 1 fi while [ "$#" -ne 0 ] do case "$1" in -f*) FILE=${FILERT}assign`echo $1 | sed y/-/./`;; -s*) FILE=${FILERT}assign`echo $1 | sed y/-/./`;; -h) FILE=${FILERT}abbrevs;; *) fgrep -i $1 $FILE ;; esac shift done exit 0