2015-03-24 01:02 AM
I'm trying to configure our NetApps using Plink from SSH and I have the entire thing working except for the "sp setup" command.
This command is interactive and requires the user to enter "y", "n", IP, Netmask, Gateway in response to several prompts that pop up after you run the sp setup command.
I can't seem to find a way to automate these entries so that they don't prompt the user for input or hang the script.
I've tried "echo y|plink.exe .........." and that will work for the first prompt, but the second I try to add any additional inputs for the later prompts, all of the input fails (ex: (echo y&echo n)|plink.exe .......)
Is there a way to pipe input into the sp setup command right from the command line of the SSH window with no user interaction? Perhaps something I could type by hand in a manual SSH session just to verify that it works, along the lines of echo y|sp setup or echo y>(sp setup)?
Maybe there is some fancy command I could do using "priv set advanced"?
2015-03-31 03:20 AM - edited 2015-03-31 03:27 AM
For automating interactive programs, I would prefer using "expect" on a Linux system.
A simple script for example, does telnet to a remote server and executes "ls" command;
spawn telnet 192.168.0.1
dont know whether it works on windows platform :-(