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*

5
  • I tried doing the same but with brackets and apparently when using brackets it does not work Commented May 26, 2015 at 15:40
  • 7
    What is the syntax to match multiple file names? say I want to exclude .org, .png, .txt ? Commented Jan 17, 2018 at 1:57
  • @Freedo @() for a pattern-list: stackoverflow.com/a/217208/3779853 Commented Aug 22, 2019 at 16:51
  • 1
    is there a way to do the same when using /bin/sh? Commented Nov 21, 2019 at 15:32
  • For plain sh, I'd use a for-loop with a case statement inside to decide which files to keep. Commented Nov 21, 2019 at 17:01