변군이글루

[스크립트] FTP 업로드 스크립트 본문

문___스크립트

[스크립트] FTP 업로드 스크립트

변군 변군이글루 2015.07.19 22:24

 

[root@nlog log]# cat ftp.sh

#!/bin/sh

 

DATE=`date -d today +%Y%m%d`

 

#relay3.scbyun.com

#relay4.scbyun.com

#relay5.scbyun.com

#relay6.scbyun.com

#relay7.scbyun.com

#relay8.scbyun.com

#relay9.scbyun.com

#relay10.scbyun.com

 

SERVER_LIST="

relay2.scbyun.com

"

 

USER='xman'

PASSWD='dusrnth2001'

FILE='$DATE*.log'

#for SERVER in ${SERVER_LIST}

#do

 

ftp -vn $SERVER_LIST <<END_SCRIPT

quote USER $USER

quote PASS $PASSWD

bi

ha

cd /var/slogs

lcd /data/newlog/$SERVER_LIST

prompt

mget $FILE

quit

END_SCRIPT

 

#done

 

 

0 Comments
댓글쓰기 폼