Re: Cannot execute shell scripts/command separated by ";" with execute() method
On 10/17/17 12:07 PM, Paolo Di Tommaso wrote:
> cmdArgs = ["bash", "-c", "/opt/test.sh; sqlplus username" ];
> cmdArgs.execute(env, workDir);
Just to clarify:
The parsing of the command line (such as separating commands with ; ) is done by the shell.
That's why the above code works.
You are executing "bash" and passing it the "command line" so it can be interpreted and executed.