Re: Problems with expect and scp
- From: Bezoar <cwjolly@xxxxxxxxx>
- Date: Thu, 21 Jun 2007 20:16:31 -0000
On Jun 13, 3:23 am, "Esa Heikkinen" <esa.heikki...@xxxxxxxx> wrote:
Hi
I have problems with expect (5.43) and scp (Cygwin) in Windows NT.
With ssh (Cygwin) there are no problems and it works very well.
If i give my scp-command (scp l...@xxxxxxx:/home/login/log/* .) "by hand"
(in Cygwin), it works very well.
(login and IP-address has been changed.)
My script:
spawn scp l...@xxxxxxx:/home/login/* .
expect "password:"
send "password\r"
Following error message was generated:
"write(spawn_id=1]: broken pipe"
Why ssh works with expect, but scp does not ?
---
Esa
I know on my system that the shell will expand the * to a filename so
I have to get
the files like so
scp chuck@chimpy:/home/chuck/"*" .
this will prevent the scp from expanding the * to a file and screwing
up the command
Now when you do this in expect , tcl does not do shell expansion so
you are trying to
transfer a file named * not all files in the directory. Since it
cannot find file * it dies
you need to do this:
spawn scp l...@xxxxxxx:/home/login/log/\"\*\" .
Carl
.
- Follow-Ups:
- Re: Problems with expect and scp
- From: esa . heikkinen
- Re: Problems with expect and scp
- References:
- Problems with expect and scp
- From: Esa Heikkinen
- Problems with expect and scp
- Prev by Date: Re: TWAPI + HELP
- Next by Date: Re: tls cert verification failure
- Previous by thread: Problems with expect and scp
- Next by thread: Re: Problems with expect and scp
- Index(es):
Relevant Pages
|
|