Unix Shell SFTP自动下载文件

时间:2016-09-23 09:15:08

标签: shell unix sftp

我是Unix Script中的新手,下面是我的脚本,执行此文件时出现此错误: /root/bin/autodownload.sh:line 20:语法错误:意外的文件结尾

seq(df$time[1], df$time[length(df$time)], by = "hour")

1 个答案:

答案 0 :(得分:0)

试试这个;

您需要在EOF之前删除空格。 EOF应位于左边缘:

#!/bin/bash
while [ 1 ]  
do
        sftp mdogru@localhost << EOF 
        cd outbound
        lcd /home/mdogru/    
        get Abc*
        bye
EOF
        sleep 60

done
相关问题