Skip to content

Instantly share code, notes, and snippets.

@andrzejsliwa
Created October 24, 2014 23:05
Show Gist options
  • Save andrzejsliwa/4a88c0b876cedd7ef9b4 to your computer and use it in GitHub Desktop.
Save andrzejsliwa/4a88c0b876cedd7ef9b4 to your computer and use it in GitHub Desktop.
Runtime r = Runtime.getRuntime();
Process p = r.exec("uname -a");
p.waitFor();
BufferedReader b = new BufferedReader(new InputStreamReader(p.getInputStream()));
String line = "";
while ((line = b.readLine()) != null) {
System.out.println(line);
}
b.close();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment