This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

use lftp in tcl

Help for those learning Tcl or writing their own scripts.
Post Reply
s
samba
Voice
Posts: 1
Joined: Sun Aug 10, 2008 10:45 am

use lftp in tcl

Post by samba »

I use the shell command:

Code: Select all

lftp -c 'open ip -u username,password -p port -e "mget /dir/"'
I want to use this in .tcl is that possible?

I already try:

Code: Select all

exec lftp -c 'open ip -u username,password -p port -e "mget /dir/"'
but that gives the msg:

Tcl error [test]: extra characters after close-quote

Anyone a idea?
n
nml375
Revered One
Posts: 2860
Joined: Fri Aug 04, 2006 2:09 pm

Post by nml375 »

Make sure you pass the whole command set as a single argument, such as this:

Code: Select all

exec lftp -c {open ip -u username,password -p port -e "mget /dir/"}
#or
exec lftp -c "open ip -u username,password -p port -e \"mget /dir/\""
NML_375
Post Reply