From: Rajan V. <raj...@gm...> - 2010-09-16 05:47:32
|
I tried $expect_obj->before() but it does not return the entire output. On Wed, Sep 15, 2010 at 11:07 PM, Satish Pothuri <sat...@gm...>wrote: > > you can use expect before() function to get the command output. It actually > captures the date from last expect string to current expect string. > variable = $exp_obj->before() > > On Wed, Sep 15, 2010 at 11:31 PM, Rajan Vijayaraghavan < > raj...@gm...> wrote: > >> All, >> I am using Perl with Expect for automating wpa_cli for wps. >> I have a general question. For example if a command has been sent to >> to either a remote machine or a spawned process, how to read the >> entire output of the command executed. How does expect store so >> that I can parse and use it for later purpose? >> >> >> For example, if I telnet to a remote machine and read a file (cat >> <filename>) >> using expect. How can I store the entire cat output in a variable and use >> it >> for later parsing? Any pointer would be helpful. >> >> Thank you. >> >> -- >> Regards, >> Rajan Vijayaraghavan >> >> >> >> ------------------------------------------------------------------------------ >> Start uncovering the many advantages of virtual appliances >> and start using them to simplify application deployment and >> accelerate your shift to cloud computing. >> http://p.sf.net/sfu/novell-sfdev2dev >> _______________________________________________ >> Expectperl-discuss mailing list >> Exp...@li... >> https://lists.sourceforge.net/lists/listinfo/expectperl-discuss >> >> > -- Regards, Rajan Vijayaraghavan Mobile: +91 9880763421 |