|
From: <RGi...@a1...> - 2002-03-26 12:19:12
|
> I have Expect 1.12 on my system(Solaris 7
> s998s_SunServer_21al2b).
Please upgrade to IO-Tty v1.01 and Expect v1.15. Be sure to read the
FAQs in the Expect docs.
> 2)The second query which I have is how do I handle ANY
> prompt when i rlogin into the server.I am actually
> taking username and password in a cgi-script and then
> spawning a rlogin-session.Since different users may
> have different values set for PS1,what is the most
> efficient regular expression to be put in
> $rlogin->expect followed by which I will be able to
> send a command using $rlogin->send("cmd\r");
Sorry, there is no generic answer. A user can change the prompt to
something completely arbitrary. qr(^\S*[]$#%>] \Z) should cover the
most common styles, though.
I'd suggest switching to 'rsh' to avoid the prompt issue completely, or
even better to use 'ssh'.
Hope this helps,
Roland
--
RGi...@cp...
|