title: Using Awk to remove one of multiple file extensions?
body: <p>I'm working on some stuff related to converting files, and I'm trying to find a shell command to remove the original file extension.
  For example, if I convert a file called <code>text.rtf</code>, it will be converted into <code>text.rtf.mobi</code>. I'd like to use something to remove the .rtf (or any other extension) so it's only <code>text.mobi</code>.</p>
  
  <p>I've been playing with awk and sed but I couldn't get anything to work. I'm not sure how to get it to pick up both the original extension and the .mobi, but only remove the original extension.</p>
  
  <p>Somewhat related, where should I be going to pick up regex and actually understand it instead of just immense amounts of Googling? Thanks.</p>
  
  <p><strong>EDIT</strong>: I was a little unclear in the original post so let me clarify. The shell command I need is for removing the original extension in a converted file, such as text.ANYTHING.mobi. Sorry about the confusion.</p>