Hi,
Iam trying to code in java and wanted to run the commands in the Unix remote servers. I have the following code to run multiple GREP commands from a file in a single session.
But when i execute this, the first command executes successfully, whereas from the next line it says
"Exception Occured
java.io.IOException: A remote execution has already started."
Following is my code snippet :
FileReader fr = new FileReader("grepcommands.txt");
BufferedReader br = new BufferedReader(fr);
String inputscript="";
sess= conn.openSession();
while((inputscript=br.readLine())!=null){
sess.execCommand(inputscript);
}
sess.close();
It would be great if anyone can provide me the solution for this.
Iam trying to code in java and wanted to run the commands in the Unix remote servers. I have the following code to run multiple GREP commands from a file in a single session.
But when i execute this, the first command executes successfully, whereas from the next line it says
"Exception Occured
java.io.IOException: A remote execution has already started."
Following is my code snippet :
FileReader fr = new FileReader("grepcommands.txt");
BufferedReader br = new BufferedReader(fr);
String inputscript="";
sess= conn.openSession();
while((inputscript=br.readLine())!=null){
sess.execCommand(inputscript);
}
sess.close();
It would be great if anyone can provide me the solution for this.