Il 24/09/2010 22:10, Boyd Stephen Smith Jr. ha scritto:
In<20100924141439.gn15...@wasteland.homelinux.net>, Jochen Schulz wrote:
Enrico Weigelt:
do_rm() {
while read FILE ; do rm -fr $FILE ; done
}
That won't work with spaces in filenames. :) "find … -exec" or "find …
-print0 | xargs -0" are the best ways to do this. Apart from "find …
-delete" which I regularly forget. :)
Actually, that *will* work with spaces in the filenames[1], since the shell
built-in read doesn't stop until end of line. There are some other, even less
common, characters that can confuse read though: '\', '"', and NL.
No, it won't.
Look at "rm -fr $FILE" <-- $FILE isn't quoted ;D
--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/4c9f6907$0$18650$4fafb...@reader3.news.tin.it