Consider the following code:
String commandf = \"ls /etc | grep release\"; try { // Execute the command and wait for it to complete Process child =
Create a Runtime to run each of the process. Get the OutputStream from the first Runtime and copy it into the InputStream from the second one.