
The following script locates a specified content title from a 
#!/bin/ksh
# smc_restore: Script to restore an SMC backup
usage() {
echo "usage: smc_restore 
}
printNumber() { case $1 in
*1)echo "$1st";; *2)echo "$1nd";; *3)echo "$1rd";; *) echo "$1th";;
esac
}
date=`date +%Y.%m.%d` inputDevice="/dev/rmt/0" contentsFile="SMCBackup.$date"
| if set  | `getopt "c:" $*`; then | 
| while [ | $#  | 
| case "$1" in | |
| contentsFile=$2; | |
| 
 | shift 2;; | 
| shift; | |
| 
 | break;; | 
| usage; | |
| 
 | exit 1;; | 
| *) | break; | 
| 
 | ;; | 
esac
done
fi
for t in $*; do found=false;
grep $t $contentsFile while read date tape fileNumber title; do
echo "$t is the `printNumber $fileNumber` title on the `printNumber $tape` tape created on $date"
