FtpUpload.sh for ksh

vi ftpUpload.sh

inset :

#!/bin/ksh

####Ftp Upload####

##################

echo "Enter FtpServer IP:"

read ServerIP

echo "Enter FtpServer User:"

read username

echo "Enter User Password:"

read password

echo "Enter remote Dir:"

read remote_dir

ftp -n -i << EOF

open ${ServerIP}

user ${username} ${password}

cd ${remote_dir}

pwd

binary

status

mput *.txt

ls

close

bye

EOF

 

 

猜你喜欢

转载自my.oschina.net/Birdofprey/blog/1798443