Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

7
  • i like this one best as it removes the need fore filelist Commented Apr 30, 2014 at 14:56
  • +1 from me, although it doesn't deal very well with spaces. Perhaps some single quotes (') should be added i.e. keep=( -name \'"$REPLY"\' ) and keep+=( -o -name \'"$REPLY"\' ). Commented Aug 26, 2014 at 0:36
  • the above is dangerous, because you can delete accidentally files. Commented Aug 26, 2014 at 1:28
  • @CristianCiupitu doesn't it? I added a demo showing that it deals very well with whitespace. Commented Aug 26, 2014 at 13:13
  • @davidva Under what circumstances? Any time you automate deleting things you run the risk of making a mistake, but within the parameters of the question I think my demo proves this approach is sound. Commented Aug 26, 2014 at 13:15