Skip to content

Instantly share code, notes, and snippets.

@stephtdouglas
Created September 17, 2022 16:44
Show Gist options
  • Save stephtdouglas/bc80f2bf1458330f5fc20dbba82290cc to your computer and use it in GitHub Desktop.
Save stephtdouglas/bc80f2bf1458330f5fc20dbba82290cc to your computer and use it in GitHub Desktop.
Script to append a grading rubric onto the beginning of every PDF in a directory
input_folder="./CA1_submitted"
output_folder="./CA1_rubrics"
rubric="CA1_rubric.pdf"
ls $input_folder/*.pdf > inlist
while read -r line
do
# echo "$line"
fname=${line##*/}
# echo $fname
outfile=$output_folder/$fname
# echo $outfile
cpdf merge "$rubric" "$line" -o "$outfile"
done < inlist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment