You can do:
find ... | grep ... | while read f
do
rm $f
cvs rm $f
done
Noel
[EMAIL PROTECTED] on 06/06/2000 01:46:47 PM
To: [EMAIL PROTECTED]
cc: (bcc: Noel L Yap)
Subject: Re: CVS Delete All Files
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
This communication is for informational purposes only. It is not intended as
an offer or solicitation for the purchase or sale of any financial instrument
or as an official confirmation of any transaction. All market prices, data
and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein
do not necessarily reflect those of J.P. Morgan & Co. Incorporated, its
subsidiaries and affiliates.