How to use the lftp -c option?
I can open a bookmark this way:
If I want to cd to the 'test' directory, the following does not work:
$ lftp -c "cd test" bookmarkUnknown command `cd test'.$ lftp -c cd test bookmarkUsage: cd remote-dir
The commands must be put in order, so open the connection first:
$ lftp -c open bookmark cd test
$ lftp -c open bookmark; ls; pwd;
If I replace -c with -e, the same commands are executed only after exiting.
The man page says:
Commands can be separated with a semicolon, `&&' or `||'.
with ; and with &&, the ls and pwd command are executed after exit. With || they are not executed at all.
Ok, I get it. The whole command must be put within quotes.