Listing 2: Ktbtape.sh--The stop logical logging script
# Ktbtape.sh - Stop Logical logging
PS=/bin/ps; export PS
GREP=/bin/egrep; export GREP
CUT=/usr/bin/cut; export CUT
KILL=/bin/kill; export KILL
XARGS=/usr/bin/xargs; export XARGS
pid=`$PS -ef | $GREP "tbtape -c" | $GREP -v "egrep" | $CUT -c9-14`
if [ "$pid" != "" ]
then
$PS -ef | $GREP "tbtape -c" | $GREP -v "egrep" | $CUT -c9-14 |$XARGS $KILL -15
fi
|