Prasad Koyi

001-347-349-KOYI (5694)

script to recognize scratch tapes in the OFF site

#!/bin/bash
(/usr/openv/volmgr/bin/vmquery -pn SCRATCH_POOL -bx | awk ‘{ if ( $2 == “HCART2” && $3 == “NONE” ) print $1 }’
/usr/openv/volmgr/bin/vmquery -pn SCRATCH_POOL -bx | awk ‘{ if ( $2 == “HCART” && $3 == “NONE” ) print $1 }’) >/tmp/out_tape.txt
/usr/bin/sed ‘/^[00|70|80|A0]/d’ /tmp/out_tape.txt > /tmp/out_tape1.txt
echo ” ” >> /tmp/out_tape1.txt
echo ” ” >> /tmp/out_tape1.txt
cat /tmp/out_tape1.txt
#mailx -s “** RECALL TAPES FROM OFF SITE for `hostname` ** ” your_email < /tmp/out_tape1.txt
#mailx -s “** RECALL TAPES FROM OFF SITE for `hostname` ** ” your_email < /tmp/out_tape1.txt

Leave a comment »