如何使用 shell 脚本 ftp 多个文件 [英] How to ftp multiple files using a shell script
本文介绍了如何使用 shell 脚本 ftp 多个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用 shell 脚本将多个文件从一台机器 ftp 到另一台机器.下面是我的脚本:
I am trying to ftp multiple files from one machine to another using a shell script. Below is my script:
ftp -nv <<EOF
open home.machine.com
user remote monday
binary
mput *.txt
bye
<<EOF
现在,问题是,它介于两者之间,但是当我在命令提示符下尝试每个命令时.在我执行 mput *.txt
后,它要求对每个文件进行确认.当我输入 yes
时,它会移动到下一个文件,并再次询问.
Now, the problem is, it hangs in between, but when I try each and every command on the command prompt. After I execute mput *.txt
, it asks for confirmation for each and every file. When I enter yes
then it moves on to the next file, and asks again.
我错过了什么吗?
推荐答案
我尝试过这样的事情:
prompt
mput *.txt
prompt
命令关闭了用户交互,然后它工作正常.
The prompt
command closed the user interaction, and then it worked properly.
这篇关于如何使用 shell 脚本 ftp 多个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文