copyGorLogAll.sh 419 Bytes
#!/bin/bash

IPS=(
192.168.104.34
192.168.104.35
192.168.104.57
192.168.104.58
192.168.104.59
192.168.104.60
)

GOR_PATH=/opt/gorLog

for ip in ${IPS[@]}
do
  echo "scp $GOR_LOG_PATH ${ip}:$GOR_PATH ############################################# $ip"
  ssh $ip "rm -rf ${GOR_PATH} ; mkdir -p ${GOR_PATH} ;"
  scp -r $GOR_PATH/*.gz ${ip}:$GOR_PATH
done
#ssh $IP "mkdir -p ${GOR_PATH}"
#\scp $GOR_LOG_PATH ${IP}:$GOR_PATH