/ 雑記帳

対話 スクリプト rsync 自動化

#!/bin/csh

echo "Input dir_1"

echo ""

echo "/usr/local/abin"

echo ""

echo "/var/video/@top-souko"

echo ""

echo "/var/video/CD-MOTO2"

echo ""

echo "/var/video/@BACUP"

echo ""

echo "/var/video/@DOCUMENT"

echo ""

#

set dir_1 = $<

echo "------------------------------------------"

#

#現在位置

#

set PWD_1=`pwd`

#

cd dir_1

cd ../

#

#配下ディレクトリー設定

#

set PWD_2=`pwd`

echo ""

echo "$PWD_2/"

#

#実行ディレクトリーへ戻る

#

cd $PWD_1

echo ""

#ls

echo "------------------------------------------"

echo "192.168.11.3:$PWD_2/"

echo ""

echo "192.168.11.4:$PWD_2/"

echo ""

echo "Output dir_2"

echo ""

set dir_2 = $<

echo ""

echo "Start rsync...."

#rsync -arpt -v --delete $dir_1 $dir_2

/usr/bin/rsync -arpt -v --rsh="/usr/bin/sshpass -p "xxxxxx" ssh -o StrictHostKeyChecking=no -l root" $dir_1 $dir_2


— posted by くま at 11:23 am   pingTrackBack [0]

この記事に対するコメントはありません

<< 2015.4 >>
SMTWTFS
   1234
567 8 91011
12 1314 15161718
19202122232425
26272829 30  
 
























T: Y: ALL: Online:
ThemePanel
Created in 0.3667 sec.