title: Find and basename not playing nicely
body: <p>I want to echo out the filename portion of a find on the linux commandline.  I've tried to use the following:</p>
  
  <pre><code>find www/*.html -type f -exec sh -c "echo $(basename {})" \;
  </code></pre>
  
  <p>and</p>
  
  <pre><code>find www/*.html -type f -exec sh -c "echo `basename {}`" \;
  </code></pre>
  
  <p>and a whole host of other combinations of escaping and quoting various parts of the text.  The result is that the path isn't stripped:</p>
  
  <pre><code>www/channel.html
  www/definition.html
  www/empty.html
  www/index.html
  www/privacypolicy.html
  </code></pre>
  
  <p>Why not?  </p>
  
  <p>Update: While I have a working solution below, I'm still interested in why "basename" doesn't do what it should do.</p>