我试着这样做
#!/bin/bash
ftp "$HOST"$3"/"$2"/" <<EOD
#toggle Interactive mode
prompt off
lcd $5"/"$4
mget "$4"*
exit
EOD
我收到以下错误
语法错误:文件意外结束
当我将其更改为或任何其他可能性时
ftp "$HOST"$3"/"$2"/" <<<EOD
#toggle Interactive mode
prompt off
lcd $5"/"$4
mget "$4"*
exit
EOD
我明白了
./download.sh: line 31: 87621 Segmentation fault: 11 ftp "$HOST"$3"/"$2"/" <<< EOD
./download.sh: line 20: prompt: command not found
./download.sh: line 21: lcd: command not found
./download.sh: line 22: mget: command not found
我不知道如何解决这个问题。我该怎么办 O_O