title: How to find all files and separate results by comma on Unix?
body: <p>I would like to go from the standard <code>find</code> output which is:</p>
  
  <pre><code>path/to/file1.yaml
  path/to/file2.yaml
  path/to/file3.yaml
  </code></pre>
  
  <p>To this:</p>
  
  <pre><code>path/to/file1.yaml,path/to/file2.yaml,path/to/file3.yaml
  </code></pre>
  
  <p>What's the simplest way to do that from the command line?</p>
  
  <p>I have tried these things:</p>
  
  <pre><code>find . -path '*.yaml' | sed -e 's/\s/,/g'
  find . -path '*.yaml' -print0 | sed -e 's/ /,/g'
  </code></pre>
  
  <p>but doesn't seem to work.</p>