Created
October 24, 2014 23:05
-
-
Save andrzejsliwa/4a88c0b876cedd7ef9b4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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