I found a similar limitation that does prevent me from using the script in automaton in a proper way. I cannot know from the returned code if the error is a permanent error or a temporary error. For some errors retry will work: server busy, concurrent access limitations but others are permanent like: login denied for bad user/password.
Also I found out that exit codes are not documented :( -- /sorin http://nusunt.eu On Thu, Oct 8, 2009 at 09:00, stucky <[email protected]> wrote: > Support > > Why does lftp exit with 0 here when it found no file to upload ? > > [cfern...@redford dev_test]$ /usr/bin/lftp -e 'set cmd:verbose yes; set > net:max-retries 3; mput SCEA_FR_up.csv; exit;' -u user,xx > sftp://my.host.com:23 > SCEA_FR_up.csv: no files found > [cfern...@redford dev_test]$ echo $? > 0 > [cfern...@redford dev_test]$ > > How can I capture the correct exit code from mput ? > > Thanks for your help > -- > stucky >
