Question: I am looking for libraries that I can use to send Unix commands from my Java code. I have already tried Expect4J and Gaynmed, but could not find good documentation with them. My requirements include:

1. Running multiple commands.
2. Capture output for previous command.
3. Take some action/Run different command based on output of last command.

Any pointers will be appreciated.

Answer: 
Try this: <https://github.com/fleipold/jproc>

Basic usage:

```
String output = ProcBuilder.run("echo", "Hello World!");

assertEquals("Hello World!\n", output);

```
Depending on what you are doing ANT is a good way to go. If you create an ant script you can then execute that script from within java. Ant would also be better supported on other environments