From: Bradford R. <bt...@po...> - 2007-11-14 20:31:28
|
On Nov 14, 2007 3:14 PM, Ken Irving <fn...@ua...> wrote: > On Wed, Nov 14, 2007 at 02:01:28PM -0600, Noah wrote: > > Hi there, > > > > I have multi-line output that I am hoping to capture repetitive output > > and hoping to dump the collected matches to a data file. > > > > Is there an example of how to use perl expect module to do this? > > From this description there's no need for expect; just pipe or otherwise > save the output into a file. I'm assuming the output is coming from a remote connection to something, not a command run at the shell... I'm pretty sure expect can do that, but I would need more details. Can you give some sample output and an example of what you consider a "match" that you want to save? You'll probably end up calling expect over and over again to get each match, so that means you may also need to look for something that tells you when to stop looking. > > > Let me know if I need more details to make things make more sense. > > I don't know; it sounds simple enough as it is. ;-) > > Expect is useful if you need to send commands to a process to get it > to send anything, more particularly if there's a need for automated > interaction with the process. > > > > > Cheers, > > > > Noah > > Good luck! > > Ken > -- > Ken Irving, fn...@ua... > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Expectperl-discuss mailing list > Exp...@li... > https://lists.sourceforge.net/lists/listinfo/expectperl-discuss > |