title: Using find to locate files that match one of multiple patterns
body: <p>I was trying to get a list of all python and html files in a directory with the command <code>find Documents -name "*.{py,html}"</code>.</p>
  
  <p>Then along came the man page:</p>
  
  <blockquote>
    <p>Braces within the pattern (‘{}’) are not considered to be special (that is, find . -name 'foo{1,2}' matches a file named foo{1,2}, not the files foo1 and foo2.</p>
  </blockquote>
  
  <p>As this is part of a pipe-chain, I'd like to be able to specify which extensions it matches at runtime (no hardcoding).  If find just can't do it, a perl one-liner (or similar) would be fine.</p>
  
  <p>Edit: The answer I eventually came up with include all sorts of crap, and is a bit long as well, so I posted it as <a href="https://stackoverflow.com/questions/1133391/code-lines-of-code-in-a-django-project/1134186#1134186">an answer</a> to the original itch I was trying to scratch.  Feel free to hack that up if you have better solutions.</p>