title: for loop output formatting: add newline with a description and space
body: <p>I'm running through a list of files to cat and redirecting all of the output to a single file using a for loop. My loop works but i'm looking for a way to add a descriptor line before each file's contents is dumped and add a space before each new file entry. Here is my script.  </p>
  
  <pre><code>#!/bin/bash
  
  files=$(ls -l /home/user/*.txt | awk 'NR&gt;=2 {print $9}')
  
  for i in $files; do /bin/cat "$i" &gt;&gt; "/home/user/catfiles.txt"
  done
  </code></pre>
  
  <p>My output looks like this:</p>
  
  <pre><code> spawn ssh user@x.x.x.x
   run $command
   quit
   spawn ssh user@x.x.x.x
   run $command
   quit
  </code></pre>
  
  <p>I would like for it to look like this:</p>
  
  <pre><code> "Description for first file here"
   spawn ssh user@x.x.x.x
   run $command
   quit
   &lt;space&gt;
   "Description for second file here"
   spawn ssh user@x.x.x.x
   run $command
   quit
   &lt;space&gt;
  </code></pre>
  
  <p>UPDATE: The file description name would need to vary by file using the actual file name. </p>
  
  <pre><code>"This is $file1"
  "This is $file2"
   etc,etc..
  </code></pre>