That will give other issues, because if the connection failed or break it wil 
also return true....

glob -exist should dot this job

The goal is to make sure that when there is no file the exit code is 0 instead 
of 1.

Any other ideas are welcome.
Regards,
Edward

From: Mattias Bergvall [mailto:mattias.bergv...@evry.com]
Sent: woensdag 11 februari 2015 9:28
To: Edward Borst; 'lftp@uniyar.ac.ru'
Subject: RE: [lftp] problem with lftp exit code

Perhaps a " || true " could be useful to implement?

Regards
Mattias Bergvall

From: lftp [mailto:lftp-boun...@uniyar.ac.ru] On Behalf Of Edward Borst
Sent: onsdag den 11 februari 2015 08:50
To: 'lftp@uniyar.ac.ru'
Subject: [lftp] problem with lftp exit code

Hi,

I'm using lftp to receive files, but sometimes the files do not exist.
Therefore I'm using this command:

lftp -e "glob --exist /tmp/mtc/otp*.* && mget -E /tmp/mtc/otp*.* -O 
/<SOMEDIR>;quit" -u <USER> sftp://<SERVER>

The problem I have is that the exitcode is still 1 when no file exist.


How can I solve this?

Regards,
Edward
_______________________________________________
lftp mailing list
lftp@uniyar.ac.ru
http://univ.uniyar.ac.ru/mailman/listinfo/lftp

Reply via email to