#!/bin/sh MINSCRATCH=10 # The required minium of scratch tapes. NUMBER=`/usr/openv/volmgr/bin/vmquery -pn scratch | grep "media ID" | wc -l` if [ $NUMBER -lt $MINSCRATCH ]; then /bin/echo "There only $NUMBER tapes in the SCRATCH pool!!!" | /bin/mail someone@who.cares fi