title: Bash: Sort files from 'find' by contents
body: <p>I have the line:</p>
  
  <pre><code>find -maxdepth 1 -type f -iname '*key*'  -not -name '*~'
  </code></pre>
  
  <p>I want to extract the contents (which should be text) of all the files returned and pipe that into <code>sort</code> to be sorted alphabetically. I've tried piping the output of the above line directly into <code>sort</code> but this results in the file names being sorted rather than their contents. Do I need to turn the output of <code>find</code> into an array and then have it processed by <code>sort</code>?</p>
  
  <p>[edit] The output I want is the sorted contents.</p>