Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/bash/18.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Linux shell脚本中的EOF问题_Linux_Bash_Shell - Fatal编程技术网

Linux shell脚本中的EOF问题

Linux shell脚本中的EOF问题,linux,bash,shell,Linux,Bash,Shell,以下代码段出现错误:14:语法错误:意外的文件结尾 #!/bin/bash func_some() { cd some_directory lftp -u user,'password' sftp://192.168.xx.xx <<EOF cd some_directory mget ADMS_report_*${2}${3}${4}*.txt } #------------------------------ Main function -----

以下代码段出现错误:14:语法错误:意外的文件结尾

#!/bin/bash
func_some()
{
    cd some_directory
    lftp -u user,'password' sftp://192.168.xx.xx <<EOF
    cd some_directory
    mget ADMS_report_*${2}${3}${4}*.txt
}
#------------------------------ Main function ------------------------------
func_some 2017 08 08 2017 08 07
#/bin/bash
func_some()
{
cd一些目录
lftp-u用户,“密码”sftp://192.168.xx.xx 

func_some() 
{
    cd some_directory
    lftp -u user,'password' sftp://192.168.xx.xx <<EOF
    cd some_directory
    mget ADMS_report_*${2}${3}${4}*.txt
EOF
}