title: How to cat multiple files from a list of files in Bash?
body: <p>I have a text file that holds a list of files. I want to <code>cat</code> their contents together.  What is the best way to do this?  I was doing something like this but it seems overly complex:</p>
  
  <pre><code>let count=0
  while read -r LINE
  do
      [[ "$line" =~ ^#.*$ ]] &amp;&amp; continue
      if [ $count -ne 0 ] ; then
          file="$LINE"
          while read PLINE
          do
              echo $PLINE | cat - myfilejs &gt; /tmp/out &amp;&amp; mv /tmp/out myfile.js
          done &lt; $file
      fi
      let count++
  done &lt; tmp
  </code></pre>
  
  <p>I was skipping commented lines and running into issues. There has to be a better way to do this, without two loops. Thanks!</p>