Alexander V. Lukyanov wrote:
On Wed, May 05, 2004 at 06:15:44PM -0700, David Land wrote:

I built v3.0.0 on Solaris without incident, but when I try to use the "-c <cmd>" option, I get the following error:

bash-2.05# lftp -u user,pass -c 'put file.xyz' ftp://my.host.com/
lftp: invalid option -- c
Try `lftp --help' for more information

I am able to work around by using "-e 'put file.xyz; quit'", but I can't imagine that this is what you had in mind, as the -c option is described in the man page and in the --help screen.


-c is meant to be used alone without other arguments. Please either use -e:

lftp -u user,pass -e 'put file.xyz; exit' ftp://my.host.com/

or don't use other arguments:

lftp -c 'put file.xyz -o ftp://user:[EMAIL PROTECTED]/'

which is even shorter.


Thank you. Of course, if I had thought about it a little more, I'd have remembered that I could put the username and password in the URL...


I don't know how actively you're updating the product at this point, but it might make sense to change the error message "invalid option -- c" (which is a little misleading, as the -c option is perfectly valid, just not with other options) to say something like "-c <cmd> option permits no other options". It might also be nice to note this limitation in the documentation as well.

Thank you again for a fine tool and for your very rapid reply.

Sincerely,

Dave Land

Reply via email to