如何使用shell脚本来ftp多个文件 [英] how to ftp multiple file using shell script

查看:361
本文介绍了如何使用shell脚本来ftp多个文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

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

I am trying to ftp multiple files from one machine to another using 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 next file, and asks again.

我缺少什么东西?

谢谢。

推荐答案

我试过类似的东西

i tried something like this

prompt
mput *.txt

提示符命令关闭了用户交互,然后正常工作。

prompt command closed the user interaction, and then it workedd properly.

这篇关于如何使用shell脚本来ftp多个文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆