title: Grep out all file extensions from input
body: <p>My input is a large list of files. They could have any characters in the name (including periods, because there are some package names as well). Here's some small sample input:</p>
  
  <pre><code>com.test.impl.servlets.Test.xml
  TestClass.class
  TestClass1.class
  Test2.java
  Test3.java
  </code></pre>
  
  <p>I want to know all of the different file extensions in my list, so essentially, I want egrep -o everything after the <em>last</em> period. Something like this:</p>
  
  <pre><code>input | xargs &lt;unknown command but probably egrep&gt; | sort -u
  </code></pre>
  
  <p>Would return:</p>
  
  <pre><code>.xml
  .class
  .java
  </code></pre>