The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 2001



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 Artima Forums.


I have the same problem, have you found a solution?

Posted by James Wong on November 29, 2001 at 11:21 PM

Dear Sir,

I have the same problem with my program and was wondering if you have found a solution?

Thanks in advance,

> 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,
> Sangeeta


Sponsored Links

Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us