[CLUE-Tech] expect script for cvs login? was: How do I do this?
Lynn Danielson
lynnd at techangle.com
Tue Apr 17 00:53:36 MDT 2001
Jeffery Cann wrote:
>
> Lynn Danielson wrote:
>
> > I believe the first line of your script should say
> > set password [lindex $argv 0] instead of $argv 1.
>
> AFAIK, argv 0 is the name of the script. This is the standard
> UNIX convention. I tried it anyway and it did not work.
It may be UNIX convention, but it's not TCL. Expect is a TCL
extension. In TCL the name of the program is not part of the
argv list but is placed into a variable called argv0 instead.
You might also try 'expect "assword:"' instead of 'expect
"*password:"'. I've not seen the asterisk used in the expect
examples I've seen. Also "assword:" should match both password
and Password, regardless of case. But if this change still
doesn't fix the problem, I don't know what else to suggest.
Tom Poindexter's our resident TCL guru, hopefully he's following
the thread and will have something better to offer you.
Lynn
More information about the clue-tech
mailing list