In bash I am running GnuPG to decrypt some files and I would like the output to be redirected to a file having the same name, but a different extension. Basically, if my file is named
file1.sc.xz.gpg
the file which comes out after running the GnuPG tool I would like to be stored inside another file called
file1.sc.xz
I am currently trying
find . -type f | parallel "gpg {} > {}.sc.xz"
but this results in a file called file1.sc.xz.gpg.sc.xz. How can I do this?
Later edit: I would like to do this inside one single bash command, without knowing the filename in advance.