reportfile=../reports/fulltapes.`(date |/usr/bin/tr " " "--")` robotcount=4 cat ../reports/avail_media |grep FULL |sort -k 4n -k 5n |cut -f 1,3,4 >$reportfile count=`( wc -l $reportfile |cut -d " " -f 6)` echo "There are $count total FULL tapes">>$reportfile i=0 while [ "$i" -le $robotcount ] do robotfile=../reports/robot_reports/robot.$i.`(date |/usr/bin/tr " " "--")` #cat $reportfile | tr -d "\t" | grep " $i " $reportfile >$robotfile #echo "This is the FULL tapes on robot $i. \n It is followed by the images on each tape" > $robotfile cat $reportfile |tr " " "-" |tr "\t" "#" | grep "\-\-$i\#\-\-" | tr "#" "\t" | tr "-" " " >> $robotfile echo " " >> $robotfile echo " " >> $robotfile tapes=`(cat $robotfile | cut -f 1)` echo "The FULL tapes for robot $i are:" echo " " echo $tapes echo " " echo "There are `echo $tapes |wc -w |tr -d " "` FULL tapes." >> $robotfile echo " " >> $robotfile echo " " >> $robotfile for tape in $tapes do echo "=========================================== $tape =============================================================">>$robotfile echo "Now doing tape $tape" /usr/openv/netbackup/bin/admincmd/bpimmedia -U -mediaid $tape >>$robotfile echo " " >> $robotfile echo " " >> $robotfile /usr/openv/volmgr/bin/vmquery -m $tape |tr -d "=">>$robotfile echo "================================================================================================================">>$robotfile done #echo " this is $robotfile" i=`expr $i + 1` done echo " " echo "ALL DONE!!!"