脚本内容,输入参数后对FTP上文件进行操作: cat upload.sh #!/usr/bin/env bash ftp -v -n <<! open 127.0.0.1 //ftp ip 地址 user $1 $2 //用户名和密码 mkdir $3 cd $3 put $4 bye !