Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

expect dilemma

Status
Not open for further replies.

nimrodman

MIS
Nov 22, 2005
43
US
Could anyone tell me any reason why the following does not work, please:
\#!/usr/local/bin/expect -f
set PASSWORD "xxxxxxx"
print "spawn sftp $user@rnode"
print "expect \"password:\r\""
print "send \"$PASSWORD\r\"
...
expect eof

It this expect script is embedded into a ksh script, but seems that it is not starting nor is it passing the password, any help would be appreciated, thanks.

 
Any chance you could say us how you embedded it into your ksh script ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
I made the expect part as a function and called that function.
 
First, a question.

Why not scp?

Lots of people make the assumption that sftp is ftp with security added, instead it is the ftp interface upon scp/ssh.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top