title: File name without extension in bash for loop
body: <p>In a for loop like this one:</p>
  
  <pre><code>for f in `ls *.avi`; do echo $f; ffmpeg -i $f $f.mp3; done
  </code></pre>
  
  <p>$f will be the complete filename, including the extension. For example, for song1.avi the output of the command will be song1.avi.mp3. Is there a way to get only song1, without the .avi from the for loop?</p>
  
  <p>I imagine there are ways to do that using awk or other such tools, but I'm hoping there's something more straight forward.</p>
  
  <p>Thanks</p>