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*

3
  • Just a remark: this assumes that you don't have other dots in file names as for example a.b.c.txt. Commented Nov 7, 2014 at 13:17
  • I'd like to offer substitute sort and wc by grep -o "\..\{,4\}$" | uniq -c Commented Nov 7, 2014 at 13:48
  • Well, one can replace sort and wc with rev | cut -d. -f1 | rev | uniq -c or even use finds exec option to directly execute awk -F"." '{print $NF}' and then pipe results to uniq -c. Commented Nov 7, 2014 at 14:24