On Wednesday, May 05, 2004 10:31 PM GMT+1, Goswin von Brederlow
<[EMAIL PROTECTED]> wrote:

> "Adam D. Barratt" <[EMAIL PROTECTED]> writes:
>
>> On Wed, 2004-05-05 at 19:17, Andreas Metzler wrote:
>>> [...]
>>> <nitpick follows>
>>> PS: for i in images/*.ppm images/*.pbm; do rm -vf $$i.gz ... hurts
>>> my eyes. Please quote $$i.gz, ie.: "$$i.gz". ;-)
>>> PPS: I'd use sind find -print0 ... | xargs -0 rm ....
>>
>> Even better, xargs -0r rm. That way, rm won't throw an error if no
>> files exist. (Yes, I know you know this :->)
>>
>> Adam
>
> Even better, if its in a makefile, use pattern subsitution to convert
> the list of files to the .gz name and call rm just once.
> (Unless you have a million of them, then xarg rm the list).

Fair point. makefiles never really were my forté.

> Doing such a for loop can take minutes on the slower buildds instead
> of seconds.

Yes, but doing it the efficient way didn't have the same comedic potential
in this context. :-) (Hint: "dpkg -S $(which find) $(which xargs)" and look
at the maintainer).

Adam


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to