For Programmers: Free Programming Magazines  


Home > Archive > Tcl > June 2007 > Problems with expect and scp









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Problems with expect and scp
Esa Heikkinen

2007-06-13, 8:09 am

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 login@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 login@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


Bezoar

2007-06-21, 7:13 pm

On Jun 13, 3:23 am, "Esa Heikkinen" <esa.heikki...@insta.fi> 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...@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 l...@1.1.1.1:/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...@1.1.1.1:/home/login/log/\"\*\" .


Carl

Seems

2007-06-22, 9:28 pm

Christina Applegate and Jessica Alba playing with each other on film!
http://www.YourTubeAmp.com/Play?movie=1673286

michael jackson child free porn tube video lesbian mainstream movie jocuri pentru copii gratis google nhl video
anal free home sex video free ah lesbian video free download xxx movie britney spears nude pussy [url=http://new-dam-hussein-execution.org/dam-hussein-photo.html]dam hussein photo[/url]
epic movie watch bestiality sex porn movie free hollywood video coupon free homemade porn movie britney pussy spear video
free paris hilton xxx video britney spears sex pic free hot xxx video adult video store step up movie

free porn clip preview
asian adult movie club
postales cristianas gratis
video clip xxx gratis
music usher video yeah
music naruto tube video
video xxx amateur gratis
lesbian mature spanking video
free online video clip
britney head spear tattoo
esa.heikkinen@insta.fi

2007-06-25, 10:10 pm

On 21 kes=E4, 23:16, Bezoar <cwjo...@gmail.com> wrote:
> On Jun 13, 3:23 am, "Esa Heikkinen" <esa.heikki...@insta.fi> wrote:
>
>
> spawnscpl...@1.1.1.1:/home/login/log/\"\*\" .
>
> Carl-


Hi

This does not work :(

Even if give command "spawn C:\\cygwin\\bin\\scp login@1.1.1.1:/home/
login/log/file.txt" this does not work.

Same error is occured.

---
Esa


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com