title: Loop through a folder of PDF files and append a single PDF to each
body: <p>This code just seems to replace the first file, not append file1.pdf to it.<br>
  I need the file to append not replace.</p>
  
  <pre><code>#!/bin/bash
  FILES=("/Users/a/folder/"*.pdf)
  for f in "${FILES[@]}"
  do
    echo "${f}"
      "/System/Library/Automator/Combine PDF Pages.action/Contents/Resources/join.py" -o "${f}" "${f}" "/Users/a/folder2/file1.pdf"
  done
  </code></pre>
  
  <p>I noticed, if I run the code manually, but use a different name for the first and second parameters, it seems to work. However, I do not know how to change the name of the first parameter without making it a constant.</p>