#!/bin/sh # # del_all # # Usage: del_all # # This script will delete all scripts in INDEX # from all LAN-connected I/A servers. # # By: Angel Corbera # echo "\nAbout to start DELETING all utilities in INDEX" echo "from ALL 50/51 stations connected to LAN !!!!" echo "Do you want to continue (y/n)?" read answer if [ $answer = "n" ] then exit 1 fi cd /opt/ac rm utils.ftp > /dev/null 2>&1 touch utils.ftp # # Creating temporary file utils.ftp from INDEX # echo "user root xxxxxx" >> utils.ftp echo "ascii" >> utils.ftp echo "cd /opt/ac" >> utils.ftp files=`awk '$0 !~ /^$/ {print $1}' INDEX` for y in $files do echo "delete $y" >> utils.ftp done echo "bye" >> utils.ftp # for x in 26 27 28 29 30 32 33 34 221 do echo "Deleting UTILITIES from 195.3.22.$x ..." ftp -n 195.3.22.$x < utils.ftp echo "Done!\n" done rm utils.ftp