On Tue, Jun 06, 2000 at 11:47:57AM +0200, Fredrik Liljegren wrote:
> find . -type f -print | grep -v CVS | xargs rm && xargs "cvs rm"
> 
> ..I'm not totally sure how to execute two commands on the stdin-files, but
> something like that should do.

This won't work.  It's parsed as:
        (find ... | grep ... | xargs rm) && xargs cvs rm
The pipeline feeds into the first xargs; the second reads from
the tty.  Putting in the parens:
        find ... | grep ... | (xargs rm && xargs cvs rm)
still wouldn't work; the first xargs would consume all the input,
and the second wouldn't see any.  The only way I can think of
to do this is to save the list in an intermediate buffer.

Fortunately, this particular case is easier:
        find . -type f -print | grep -v CVS | xargs cvs rm -f
(No quotes, by the way.)

--

|  | /\
|-_|/  >   Eric Siegerman, Toronto, Ont.        [EMAIL PROTECTED]
|  |  /
to me, Charlie Brown represented the courage to be sincere in the face of
ridicule. he was NOT a loser.  
thank you, Mr. Schulz.
        - Robert C. Mayo

Reply via email to