Re: lftp and patterns

<[email protected]>
Newsgroups gmane.network.lftp.user
Message-ID <93C401AF9078C74BAC57293A376BFD0F9BA3CAD6@GTLBMLXEN0001.bagmail.net>
Hi Alexander,
yep, we’ve already tried cls before. But regarding the exit code, it works the same as ls.

Exit code are an indicator if something went wrong and with lftp you have a strong partner as you can use “||” and “&&” to combine commands and exit with a specific return code, e.g. if there is no data. So to us it makes much sense, to have a possibility in lftp to check for patterns and end ls command with an error code, if no files are found.

Thanks and regards,
Tilo

From: Alexander Lukyanov [mailto:[email protected]]
Sent: Friday, June 06, 2014 6:00 PM
To: Mütze, Tilo, NMD-C4.2
Cc: Lista LFTp
Subject: Re: [lftp] lftp and patterns

Which backend protocol do you use? If ftp, then ls arguments are wholly passed to server side as LIST argument. If other protocols, then most probably you may only specify a directory to list.

There is another command - cls - which handles arguments locally and provides better functionality compared with plain "ls". Try it. Exit code may be not that you want though.

2014-04-15 17:27 GMT+04:00 <[email protected]<mailto:[email protected]>>:
Hi,
is it somehow possible, to list files by using a pattern like:
ls *.csv
dir *.csv

And if no files are found, exit that ls or dir command with an exit code <> 0?

Regards,
Tilo


_______________________________________________
lftp mailing list
[email protected]<mailto:[email protected]>
http://univ.uniyar.ac.ru/mailman/listinfo/lftp



--
   Alexander.

_______________________________________________
lftp mailing list
[email protected]
http://univ.uniyar.ac.ru/mailman/listinfo/lftp
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.