Created
August 9, 2010 10:16
-
-
Save cirpo/515247 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
<HTML> | |
<BODY> | |
<% | |
String cmd = "/tmp/test.sh" ; | |
Runtime run = Runtime.getRuntime() ; | |
Process pr = run.exec(cmd) ; | |
InputStream in = pr.getInputStream(); | |
BufferedReader reader = new BufferedReader(new InputStreamReader(in)); | |
StringBuilder sb = new StringBuilder(); | |
String line = null; | |
while ((line = reader.readLine()) != null) { | |
sb.append(line + "\n"); | |
} | |
is.close(); | |
return sb.toString(); | |
%> | |
<h1>Script <% out.println(cmd); %> lanciato!</h1> | |
</BODY> | |
</HTML> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment