Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.43 KB | None | 0 0
  1. public static void main(String[] args) throws Exception{
  2.         String [] command = {"cat", "/home/thepasto/prova_"};
  3.          Process p = Runtime.getRuntime().exec(command);
  4.         BufferedReader in = new BufferedReader(
  5.                                 new InputStreamReader(p.getInputStream()));
  6.     String line = null;
  7.         while ((line = in.readLine()) != null) {
  8.                System.out.println("Linea "+line);
  9.  
  10. }
  11.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement