These options are described in the ... OPTIONS section of the manual:
OPTIONS
-e commands
Execute given commands and don't exit.
[...]
-c commands
Execute the given commands and exit. Commands can be separated with a semicolon, `&&'
or `||'. Remember to quote the commands argument properly in the shell. This option
must be used alone without other arguments (except --norc)
The lftp
command has an interactive mode. If you use -c
, the lftp
will exit without starting this interactive mode. If you use -e
, then it won't exit, and you can continue running commands manually. So you could use -e
for running some initial setup and then use the interactive mode to do whatever you actually wanted to do (though you could also use the --rcfile
option for this).
For examples of -e
, you might have aliases like:
alias lftp_debug='lftp -e "debug -o lftp-debug-output 3"'
alias lftp_no_cahce='lftp -e "set cache:enable false"
For -c
, basically any time you have a complete set of commands to execute with lftp
with no further manual input to be provided, you can use -c
. You don't need to use exit
like the example answer you linked to, since lftp
will automatically exit anyway.