in reply to Re^2: issue with passing yes to the output of a command
in thread issue with passing yes to the output of a command

It seems that 'cfgsave' passed the yes/no question, and looks like another issue. How does 'cfgsave' behave if you run manually?
  • Comment on Re^3: issue with passing yes to the output of a command

Replies are listed 'Best First'.
Re^4: issue with passing yes to the output of a command
by janasec (Sexton) on Jul 26, 2015 at 16:56 UTC

    thanks guys i think adding "\" made the difference

    ($out,$err) = $ssh->capture2("zonecreate \"test1\", \"20:00:00:11:0d:3 +4:56:00\""); ($out,$err) = $ssh->capture2("echo yes\|cfgsave");

    thanks friends again for help

Re^4: issue with passing yes to the output of a command
by janasec (Sexton) on Jul 27, 2015 at 04:55 UTC
    DS_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] y Nothing changed: nothing to save, returning ...

    i need to pass yes after cfgsave

      The line
      Nothing changed: nothing to save, returning ...
      (or its first 5 words) indicates there would be no difference between what you want to save and what's already there, so it wouldn't matter wether you answer yes or no...