I'm trying to run a perl scripts using this java code:
ProcessBuilder ps = new ProcessBuilder("perl","test.pl","test.txt","|", "test1.pl",">","result.txt");
So the first script reads a txt
file and then print some result.
Then the second script get this output, does some others modifications, and then prints them in a new txt file result.txt
This command line works fine using cmd
on windows, but when using java, there is a problem with the |
and the >
.
Is there a way to run a such command using java?