title: Invoke a unix shell from java program?read and write a steady stream of data to and from a unix pipe from java program
body: <p>I have 2 questions</p>
  
  <p>1) how do I i invoke a unix shell from a java.runtime library to run a command like this </p>
  
  <p>Process p = Runtime.getRuntime().exec(commands);</p>
  
  <p>cat alias > bias </p>
  
  <p>2) How can I read and write to a unix pipe a steady stream of data from java.
  Do i have to make all the system calls like open read write to a pipe </p>
  
  <p>I basically want to replicate this command </p>
  
  <p>cat alias > bias </p>
  
  <p>where the steady stream of data will be come from  java program to bias and not cat alias.</p>