[TriLUG] Perl. Help. Needed.
gwbrown1 at gmail.com
Wed Mar 11 15:48:02 EDT 2009
Hum... and when you redirect STDOUT it appears that the expect commands stop
communicating from the script to the Expect.pm process. Interesting.
On Wed, Mar 11, 2009 at 3:42 PM, Greg Brown <gwbrown1 at gmail.com> wrote:
> Yes, that's true, I could do that but that would capture the entire output
> for the script which is quite involved; capturing only the desired output
> would be much more clean.
> But I'm about ready to write some "------MARK------" lines into the file
> and strip out everything outside those marks.
> But that's a last resort. This can be done.. somehow.
> On Wed, Mar 11, 2009 at 3:38 PM, <shawn.taylor at gpi.com> wrote:
>> I am by no means a perl or expect guru, but why can't you do something
>> ./script.pl > myfile.out
>> Since the script uses the expect module, there should be no required user
>> interaction no?
>> Greg Wrote:
>> Let me step back and take a breather.. how do I redirect the output of
>> print $ssh "exec \"show run\"\r";
>> I think I've tried everything. I'm open to any and all suggestions.
>> TriLUG mailing list :
>> TriLUG FAQ : http://www.trilug.org/wiki/Frequently_Asked_Questions
More information about the TriLUG