How can I run more than one bash scripts and first of them, i will export some PATH
args, I want to run ALL of them in Java. Yes it's "source XXX.sh" not "sh ..." or "./"
Asked
Active
Viewed 366 times
0

OneCricketeer
- 179,855
- 19
- 132
- 245
-
1[`ProcessBuilder`](https://docs.oracle.com/javase/9/docs/api/java/lang/ProcessBuilder.html)? – Turing85 Oct 27 '17 at 08:53
-
https://stackoverflow.com/a/15428431/1706545 – Daniel Taub Oct 27 '17 at 08:54
-
@Turing85 Does that preserve the variables that would be sourced in the first file between following executions? – OneCricketeer Oct 27 '17 at 08:56
-
I do not know for sure, but I would say no. If you need multiple calls, you could join them with `&&` inside your process. – Turing85 Oct 27 '17 at 08:57