old question, new variation.
we all know the following piece does work well:
String cmd = "ls";
Process proc = Runtime.getRuntime().exec(cmd);
here, the external command is simple enough.
now, i wanna play with pipe. for example, i wanna execute
"ls -l | grep -i abc" with Runtime (i think it's the only way). i've studied the article at but their samples don't work for me, neither in windows nor in linux.
any hints are highly appreciated.
we all know the following piece does work well:
String cmd = "ls";
Process proc = Runtime.getRuntime().exec(cmd);
here, the external command is simple enough.
now, i wanna play with pipe. for example, i wanna execute
"ls -l | grep -i abc" with Runtime (i think it's the only way). i've studied the article at but their samples don't work for me, neither in windows nor in linux.
any hints are highly appreciated.