From: Satish P. <sat...@gm...> - 2010-09-15 17:37:25
|
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 > > |