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 lo...@1.1.1.1:/home/login/log/* .) "by hand"
(in Cygwin), it works very well.
(login and IP-address has been changed.)
My script:
spawn scp lo...@1.1.1.1:/home/login/log/* .
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...@1.1.1.1:/home/login/log/\"\*\" .
Carl
Hi
This does not work :(
Even if give command "spawn C:\\cygwin\\bin\\scp lo...@1.1.1.1:/home/
login/log/file.txt" this does not work.
Same error is occured.
---
Esa