shell脚本实现ftp批量上传

2015-05-30 0 754
shell脚本实现ftp批量上传
#!/bin/sh

hostIP=´10.2.110.110´
serverName=´ftp_110´
password=´123456´

dirName=`pwd|sed 's/\//_/g'|cut -c2-`

if [ $1 = ´all' ];then
ftp -i -n $hostIP <<EOF_FTP
user ${serverName} ${password}
mkdir $fileName
cd $fileName
mput *
quit
EOF_FTP
else 
ftp -i -n $hostIP <<EOF_FTP1
user ${serverName} ${password}
put $1
quit
EOF_FTP1
fi

遇见资源网 shell shell脚本实现ftp批量上传 http://www.ox520.com/17003.html

常见问题

相关文章

发表评论
暂无评论
官方客服团队

为您解决烦忧 - 24小时在线 专业服务