Re: problem with lftp exit code
"Alexander V. Lukyanov" <[email protected]> Mon, 16 Feb 2015 15:35:10 +0300
| Newsgroups | gmane.network.lftp.user |
|---|---|
| Message-ID | <[email protected]> |
On Mon, Feb 16, 2015 at 12:22:46PM +0000, Edward Borst wrote: > 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. You can also play with "glob --not-exist", but I suspect there is no perfect solution now. Test the connection first by "cd . || exit 1". -- Alexander. > -----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