The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
July 2001

Advertisement

Advertisement

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.

Message:

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

> 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






Replies:

Sponsored Links



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