Re: problem with lftp exit code

Edward Borst <[email protected]> Mon, 16 Feb 2015 07:12:35 +0000
Newsgroups gmane.network.lftp.user
Message-ID <3FAA6F5BD1B206479FBA15A60EDE2D24DB56B5DA@EXCHSTORE01.benelux.intra.corp>
Someone else an idea to solve this?
I expected that if I use glob -exist the exit code would be 0.



From: lftp [mailto:[email protected]] On Behalf Of Edward Borst
Sent: woensdag 11 februari 2015 14:47
To: '[email protected]'
Subject: Re: [lftp] problem with lftp exit code

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:[email protected]]
Sent: woensdag 11 februari 2015 9:28
To: Edward Borst; '[email protected]'
Subject: RE: [lftp] problem with lftp exit code

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

Regards
Mattias Bergvall

From: lftp [mailto:[email protected]] On Behalf Of Edward Borst
Sent: onsdag den 11 februari 2015 08:50
To: '[email protected]'
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
[email protected]
http://univ.uniyar.ac.ru/mailman/listinfo/lftp