public void inputShell(String string) {try {Process process;process = Runtime.getRuntime().exec(new String[]{"/bin/sh","-c",string});process.waitFor();BufferedReader read = new BufferedReader(new InputStreamReader(process.getInputStream()));String line = null;String result = "";while ((line = read.readLine())!=null){result+=line;System.out.println(line);}System.out.println("result:"+result);} catch (IOException | InterruptedException e1) {e1.printStackTrace();}}
