how to run a bash script in java using input
<p>I'm trying to run a bash script file in Java program and I'm using this way:</p>

<pre><code>Runtime rt = Runtime.getRuntime();

try {           
  Process proc = rt.exec("THE PATH FILE");        
  BufferedReaderinput=newBufferedReader(newInputStreamReader(proc.getInputStream()));
  String line=null;
  while((line=input.readLine()) != null) {
    System.out.println(line);
   }
} catch (IOException ex) {
  System.out.println(ex.toString());
}
</code></pre>

<p>but I'm using an input in my bash script as $1 when I'm running it from command line and I want to use it in my Java program to take the correct output .
How can I do this in my Java program?  </p>
