janasec has asked for the wisdom of the Perl Monks concerning the following question:
hi all, I need help on passing yes to output of command cfgsave on brocade switch,when cfsave is executed from script it ask to also pass yes to save the config as shown below
my code is belowDS_6505B:admin> cfgsave You are about to save the Defined zoning configuration. This action will only save the changes on Defined configuration. If the update includes changes to one or more traffic isolation zones, you must issue the 'cfgenable' command for the changes to take effect. Do you want to save the Defined zoning configuration only? (yes, y, n +o, n): [no]
$logger->info("saving the zone"); ($out,$err) = $ssh->capture2("cfgsave"); $ssh->error and die "remote find command failed:$!" . $ssh->error; $logger->info("config saved");
the failure that i see is because the command expects to save by passing yes.how do i send it from the script
any help would be helpful
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: issue with passing yes to the output of a command
by Myrddin Wyllt (Hermit) on Jul 26, 2015 at 17:02 UTC | |
by salva (Canon) on Jul 27, 2015 at 13:51 UTC | |
|
Re: issue with passing yes to the output of a command
by toolic (Bishop) on Jul 26, 2015 at 13:53 UTC | |
|
Re: issue with passing yes to the output of a command
by pme (Monsignor) on Jul 26, 2015 at 14:16 UTC | |
by janasec (Sexton) on Jul 26, 2015 at 15:46 UTC | |
by pme (Monsignor) on Jul 26, 2015 at 15:57 UTC | |
by janasec (Sexton) on Jul 26, 2015 at 16:56 UTC | |
by janasec (Sexton) on Jul 27, 2015 at 04:55 UTC | |
by soonix (Chancellor) on Jul 27, 2015 at 10:01 UTC |