title: Is there a way to get a list of file names and the first line of text listed on the same line in Linux?
body: <p>I am trying to get a list of file names in a directory and the first line of text from each file and output each pair to a single line to be output to a .csv file.  </p>
  
  <p>I have tried a bunch of different methods of using head, ls, find, and grep and combinations of these but can't seem to get the results to print onto a single line. Closest I have gotten was getting them to print on separate lines. </p>
  
  <p>Here is an example of the output I would need:</p>
  
  <pre><code>filename1.txt "this is the first line of text"
  filename2.txt "this is the first line of text"
  </code></pre>
  
  <p>I'm not really concerned with having extra characters or anything in the results, as I can edit that out easily in Excel once I have them on the same line.</p>
  
  <p>Any help would be greatly appreciated.</p>