So given the input filename $1, how do I generate the output filename to be equal to $1 but with, say, 'decrypted.pdf' at the end?
I tried
- Code: Select all
qpdf --decrypt --password=xxx $1 "$1_decrypted.pdf"
but it gives an error.
I also tried
- Code: Select all
qpdf --decrypt --password=xxx $1 `"$1"_decrypted.pdf`
and
- Code: Select all
f="$1"_decrypted.pdf; qpdf --decrypt --password=xxx $1 $f
and so on.
Ideally, I would like to parse just the filename without extension, and add 'decrypted' to that.