#!/bin/bash
filename="password.txt"
#While loop to read line by line
while read -r line
do
readLine=$line
for file in *.pdf
do
pan="${line:0:10}"
/usr/bin/qpdf --password=$line --decrypt $file ack/2017-$pan.pdf
done
done < "$filename"