Cisco_Dave has asked for the wisdom of the Perl Monks concerning the following question:
=head2 show_run(); $output = $host->show_run(); $host->show_run($output_ref); sub show_run { my($self,$output_ref) = @_; my $data = $self->cmd('show run', undef, $output_ref, qr/^(?![:!])/) +; return $data; }
Above code takes the output from command 'show run', strips the lines starting with special chars and puts it in $data.
Is there a way to run another command and append that output to $data or show_run in $output also? Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Get outputs from 2 commands and add to var
by trippledubs (Deacon) on Nov 16, 2019 at 19:53 UTC | |
|
Re: Get outputs from 2 commands and add to var
by AnomalousMonk (Archbishop) on Nov 16, 2019 at 20:12 UTC | |
|
Re: Get outputs from 2 commands and add to var
by Cisco_Dave (Acolyte) on Nov 17, 2019 at 14:56 UTC | |
|
Re: Get outputs from 2 commands and add to var
by Anonymous Monk on Nov 16, 2019 at 22:28 UTC |