title: remove double extensions in bash
body: <p>I am familiar with rename but I was curious does rename still apply for removing duplicate extensions??  </p>
  
  <p>Say I have a few files named:</p>
  
  <ul>
  <li>picture2.jpg.jpg</li>
  <li>picture9.jpg.jpg</li>
  <li>picture3.jpg.jpg</li>
  <li>picture6.jpg.jpg</li>
  </ul>
  
  <p>How would you remove the the duplicate extension??</p>
  
  <p>End result:</p>
  
  <ul>
  <li>picture2.jpg</li>
  <li>picture9.jpg </li>
  <li>picture3.jpg</li>
  <li>picture6.jpg</li>
  </ul>