On Tue, 25 Oct 2005, dc wrote:

Sorry , I didn't get you....

Expect is a language which, once installed, can help automate many processes that would normally require interaction. It evens comes with a handy program (autoexpect) to facilitate in the creation of expect scripts. Expect is really a handy language.


nc is best described in its manpage:
   The nc (or netcat) utility is used for just about anything under the sun
   involving TCP or UDP.  It can open TCP connections, send UDP packets,
   listen on arbitrary TCP and UDP ports, do port scanning, and deal with
   both IPv4 and IPv6.  Unlike telnet(1), nc scripts nicely, and separates
   error messages onto standard error instead of sending them to standard
   output, as telnet(1) does with some.

The examples section of nc demonstrate automating SMTP and HTTP sessions; you might be able to get it to work with the TELNET protocol as well.
nc is really a handy program.


A third option (which i didn't mention before) is the perl expect module. I haven't used it, but it's supposed to function similarly to the expect language and doesn't seem to need the actual expect language installed.
Perl is really a handy language.


Good luck,


-f
http://www.blackant.net/


On 10/24/05, francisco <[EMAIL PROTECTED]> wrote:

On Mon, 24 Oct 2005, dc wrote:

Thanks ...
But if i am not wrong, expect is written in Tcl/tk scripting language.
Can I achieve the same using just shell script.

Expect will be the more robust solution, but you might be able to get nc
to do what you need.

-f
http://www.blackant.net/



Rgds,
DC

On 10/24/05, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:

In a message dated 10/24/2005 4:39:54 AM Eastern Standard Time,
[EMAIL PROTECTED] writes:

Hi ,
I was trying to automate the telnet session using solaris shell script
(here document.)
But the problem is telnet gives Login and Password prompt. How do i
automate
these actions.
You need a tool called 'expect'. If I recall correctly, it's on the
goodies
CD that comes with Solaris. If not, it's easily downloadable.

Expect is important enough to merit its own OReilly book.

_______________________________________________
Solaris-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/solaris-users

_______________________________________________
Solaris-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/solaris-users

_______________________________________________
Solaris-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/solaris-users

_______________________________________________
Solaris-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/solaris-users

_______________________________________________
Solaris-Users mailing list
[email protected]
http://www.filibeto.org/mailman/listinfo/solaris-users

Reply via email to