I want to use lftp -c to do an entire session in one go (as I'll be launching this from a script later on) and I managed with -e but that ofc leaves me with the interactive session which I don't want.
Manual states
-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.
But I don't understand how I should quote and string my commands/interactions together correctly.
lftp -e "put -O remote/dir/ /local/file.txt" -u user,pass ftpsite.com
works excellent. But I want to exit after executing the command;
lftp -c "open -u user,pass ftpsite.com" || put -O "remote/dir/ /local/file.txt"
just shouts at me, or in fact any combination of quotes I tried (|| or && regardless)