2
I'm trying to encrypt a bunch of files with the code below:
find . -name "*.vi" | sort | parallel --gnu -j 4 --workdir "$PWD" '
echo "Encrypting {/.} ..."
gpg -r user@myemail.com -o "/tank/test/{/.}.gpg" -e "{}"
';
This works fine, but only if the filenames have no spaces nor special characters (! or ') in them. Other than re-naming all the files, is there a way to make this code work?
Works! The resulting filenames have their spaces replaced by "" but that's no problem, i can just run a rename command after that. Thanks man! – Weekender – 2015-05-29T20:05:09.103
Then you have not removed enough ". Remove more. Remember {} and {/.} should never be inside " or '. – Ole Tange – 2015-05-29T20:45:04.630