使用密码文件运行gpg -c?

If we want to run gpg -c filename but with the password in a file, how do we do it.

我试过了:

gpg -c --passphrase-fd passwordinfile filetogpg

但它只是挂起。有什么想法吗?