Well, it reinforces my belief that you can only set and clear variables that are already defined (i.e., no user-defined variables). I researched the mail archive and found nothing to suggest anything different. I guess this is really a feature request... lftp would be MUCH more powerful if you could use shell variables in scripts (and, in particular, access environment variables). It is possible to work around the lack of same (by using a bash script to WRITE an lftp script), but it is awkward and adds another step that can go wrong. To give you an idea of just ONE application, I need to call lftp to send a file each day and the name of the file changes every day. I wrote a bash script that writes an lftp script each day to do this, but it would have been much nicer to do something like:
export OUTFILE="name_of_file_to_send" lftp -f script1 and then have script1 say something like: open krell.dyndns.org put $name_of_file_to_send It seems like lftp has many sophisticated capabilities, but lacks some of the more basic ones. gwalborn On Fri, Oct 14, 2011 at 8:30 AM, Justin Piszcz <jpis...@lucidpixels.com>wrote: > Hi, > > To see what you can set: > lftp> set -a > > Put any set commands in your $HOME/.lftprc, e.g.: > set cmd:verify-host no > set cmd:verify-path no > > You can add aliases in the lftprc, e.g.: > alias lm set net:limit-total-rate 2500:2500 > > Does this answer your question? > > Justin. > > > On Fri, 14 Oct 2011, Gary D Walborn wrote: > > Hello to all: >> >> I am a new user of lftp and am quite happy thus far. I guess I'm a >> little confused about "variables". It appears that you can't define NEW >> variables, but rather can only change the variables that are predefined in >> the system. Am I missing something? Also, is there no way to access the >> values of environment variables in lftp? If not, it would be a fabulous >> improvement to lftp to allow use of variables in the way that bash does. >> Any thoughts? >> >> -- >> Gary D. Walborn >> gwalb...@gmail.com >> >> -- Gary D. Walborn gwalb...@gmail.com
_______________________________________________ lftp mailing list lftp@uniyar.ac.ru http://univ.uniyar.ac.ru/mailman/listinfo/lftp