Unix 如何使用shell脚本ftp多个文件

Unix 如何使用shell脚本ftp多个文件,unix,ftp,Unix,Ftp,我正在尝试使用shell脚本将多个文件从一台机器ftp到另一台机器。以下是我的脚本:- ftp -nv <<EOF open home.machine.com user remote monday binary mput *.txt bye <<EOF 手册中的ftp-nv -i在多个文件传输期间关闭交互式提示 我试过这样的东西 prompt mput *.txt prompt命令关闭了用户交互,然后它正常工作。根据您的代码片段,应该是这样的: ftp -inv &l

我正在尝试使用shell脚本将多个文件从一台机器ftp到另一台机器。以下是我的脚本:-

ftp -nv <<EOF
open home.machine.com
user remote monday
binary
mput *.txt
bye
<<EOF
手册中的ftp-nv

-i
在多个文件传输期间关闭交互式提示


我试过这样的东西

prompt
mput *.txt

prompt
命令关闭了用户交互,然后它正常工作。

根据您的代码片段,应该是这样的:

ftp -inv <<EOF
open home.machine.com
user remote monday
binary
mput *.txt
bye
<<EOF

ftp-inv
ftp-n ftp.test.com我像
mput-i*.txt
一样试过,但也没用..我用错了吗。。当我尝试这个的时候。。只有2-3个文件获得ftp rest不…请删除'
ftp -n ftp.test.com <<+
user ftpUser  password 
cd  local_dir/
lcd  remote_dir/
mget *.*
mdelete *.*
quit
bye
+