Re: problem with lftp exit code

Edward Borst <[email protected]> Mon, 16 Feb 2015 12:22:46 +0000
Newsgroups gmane.network.lftp.user
Message-ID <3FAA6F5BD1B206479FBA15A60EDE2D24DB56B76D@EXCHSTORE01.benelux.intra.corp>
Hi Alexander,

Unfortunately this does not solve the issue in the correct way.
Because if the connection is down, or there is a login problem the exit code will also be 0....

I only want the exit status 0 when there is no file.

-----Original Message-----
From: Alexander V. Lukyanov [mailto:[email protected]] 
Sent: maandag 16 februari 2015 13:15
To: Edward Borst
Cc: '[email protected]'
Subject: Re: [lftp] problem with lftp exit code

On Mon, Feb 16, 2015 at 07:12:35AM +0000, Edward Borst wrote:
> Someone else an idea to solve this?
> I expected that if I use glob -exist the exit code would be 0.

You can use this:
	glob --exist /tmp/mtc/otp*.* || exit 0

-- 
   Alexander.
_______________________________________________
lftp mailing list
[email protected]
http://univ.uniyar.ac.ru/mailman/listinfo/lftp