FileDocCategorySizeDatePackage
ExecShellArgs.javaAPI DocExample556Sun Apr 29 10:54:06 BST 2001None

ExecShellArgs

public class ExecShellArgs extends Object

Fields Summary
Constructors Summary
Methods Summary
public static voidmain(java.lang.String[] args)

		Runtime r = Runtime.getRuntime();
		String[] nargs = { "sh", "-c", "for i in 1 2 3; do echo $i; done" };
		Process p = r.exec(nargs);
		BufferedReader is = 
			new BufferedReader(new InputStreamReader(p.getInputStream()));
		String line;
		while ((line = is.readLine()) != null)
			System.out.println(line);