Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

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

by janasec (Sexton)
on Jul 26, 2015 at 15:46 UTC ( [id://1136358]=note: print w/replies, xml ) Need Help??


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

tried above step

($out,$err) = $ssh->capture2("yes|cfgsave");

getting error

2015/07/27 02:38:56 saving the zone remote find command failed:child exited with code 248 at ./switchconfi +g.pl line 113, <$fh> line 4.

Replies are listed 'Best First'.
Re^3: issue with passing yes to the output of a command
by pme (Monsignor) on Jul 26, 2015 at 15:57 UTC
    It seems that 'cfgsave' passed the yes/no question, and looks like another issue. How does 'cfgsave' behave if you run manually?

      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

      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...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1136358]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others about the Monastery: (7)
As of 2024-03-28 11:14 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found