Sponsored Link •
Legacy Java Answers Forum
This page contains an archived post to the Java Answers Forum made prior to February 25, 2002.
If you wish to participate in discussions, please visit the new
running unix "PIPE" command from java program
Posted by Sangeeta on July 04, 2001 at 7:26 PM
I want to run the command
ls -l | grep x
from within a Java program.
Process p = Runtime.getRuntime().exec(" ls -l | grep x ");
is not recognising "|".
Has anybody tried this before? If yes, then pls let me
know. It will be of great help.
Thanks and regards,