Skip to content

Instantly share code, notes, and snippets.

@tonussi
Created August 14, 2013 02:47
Show Gist options
  • Save tonussi/6227609 to your computer and use it in GitHub Desktop.
Save tonussi/6227609 to your computer and use it in GitHub Desktop.
#!/bin/bash
cd "/path/to/dir"
for file in `dir -d *` ; do
t=$(mktemp)
qpdf --password="password" --decrypt "$file" "$t" && \
mv "$t" "$file"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment