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*

4
  • This won't work. Will only match files where the path and the filename both match (except for case). It won't match /tmp/BAR and /tmp/a/BAr. Commented Oct 31, 2014 at 16:57
  • But the question is not (only) about files in the same directory... Commented Oct 31, 2014 at 17:00
  • Well, that was far from obvious until the OP edited the question, which happened while I was typing my answer. Commented Oct 31, 2014 at 17:09
  • I had to use sort -f -k1, works great otherwise. Commented Apr 23 at 13:27