E
-eraz-
Tripel-As
Ich arbeite an einem Skript, dass mir u.a. ein File von einem FTP host runterlädt. Funktioniert an sich super, allerdings nicht wenn ich den ganzen Code in eine funktion einfüge. Schaut so aus:
Das Problem scheint das '<<EOF' zu sein, das mag er anscheinend nicht in einer funktion. Weiß einer warum? Ich bin leider ziemlich ratlos...
Code:
function download_file {
filename=$(cat inhalt | tail -n1 | cut -d" " -f20)
lftp << EOF
debug -o /opt/rvs/lftp_file_transfer.log
set ftp:ssl-force true
set ftp:ssl-protect-data true
connect xxx:3021
cd 'xxx'
lcd $dir
get1 "$filename"
bye
EOF
}
Das Problem scheint das '<<EOF' zu sein, das mag er anscheinend nicht in einer funktion. Weiß einer warum? Ich bin leider ziemlich ratlos...