Quote:
Originally Posted by beeblequix
Howdy Folks,
For the longest time I've been using a "here" statement with the old ftp program on SLES 8-11 to automate file transfers from my server to another location by calling a function similar to this in my bash scripts:
function ftp_my_file {
/usr/bin/ftp -A -n <<here
open some.ip.address
user my_username my_password
epsv4
bin
put $FILE_TO_FTP
quit
here
}
This function has worked fine up until we upgraded to SLES 12 and the old FTP program was replaced with Lftp which doesn't use the same syntax. Does someone have a method in a script using lftp that does the same thing? Thanks.
|
Scanning the man lftp page, I don't see any difference in the syntax except, perhaps, for the syntax for epsv.
I also note that binary is the default transfer mode, but the syntax to specify that is also different in lftp.
The HERE document should continue to work once you modify the commands accordingly.
Suggest you review
man lftp. It should be easy enough to convert your script.