From: Ron S. <gee...@ya...> - 2009-05-12 16:09:12
|
--- On Sun, 5/10/09, Dhiren Chandvania <cd...@gm...> wrote: > From: Dhiren Chandvania <cd...@gm...> > Subject: [Expectperl-discuss] using expect to spawn a process on remote system > To: exp...@li... > Date: Sunday, May 10, 2009, 5:51 AM > Hi All, > > I am new to Expect and want to write a Perl program which > shall > spawn/interact with a remote program say e.g. xyz which has > interactive > promts. The remote system supports telnet to login. Can > someone send me the > perl code to achieve this? > > Many thanks in advance. > > > local system: > ---------------------- > ./abc.pl //this program has to spawn a > remote progrm "xyz" > and send interactive commands based on the prompts shown > below > > > > > remote system > ----------------------- > > ./xyz > > Do you wish to continue [Y/N]: > Are you sure [y]: > Enter your name: > ------------------------------------------------------------------------------ > The NEW KODAK i700 Series Scanners deliver under ANY > circumstances! Your > production scanning environment may not be a perfect world > - but thanks to > Kodak, there's a perfect scanner to get the job done! > With the NEW KODAK i700 > Series Scanner you'll get full speed at 300 dpi even > with all image > processing features enabled. > http://p.sf.net/sfu/kodak-com_______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss You can get a get deal of information at: http://expect.nist.gov/ (Expect Home Page). Also, you may want to look into getting the definitive book on Expect: Exploring Expect by Don Libes published by O'Reilly. in a pinch, you can always Google "using Expect". There are scripts around that can/will give you a guideline to go by. Expect is a great tool, really powerfull and easy to use. Ron Smith gee...@ya... |