Skip to content

Instantly share code, notes, and snippets.

View omerfeyyaz's full-sized avatar

Feyyaz Özdemir omerfeyyaz

View GitHub Profile
@omerfeyyaz
omerfeyyaz / bash.java
Last active March 12, 2016 21:44
Shell komutlarını çalıştırmak
public static String executeShellCommand(String command) {
StringBuilder stringBuilder = new StringBuilder();
Process process = null;
BufferedReader br = null;
try {
process = Runtime.getRuntime().exec(command);
br = new BufferedReader(new InputStreamReader(process.getInputStream()));
String line;
while ((line = br.readLine()) != null) {
stringBuilder.append(line + "\n");