Feature request. An option in gpg to copy STDIN to STDOUT instead of nowhere.

Gilles LAMIRAL gilles at lamiral.info
Mon Dec 18 22:40:31 CET 2023


The command "gpg --decrypt" takes a file or STDIN as input and decrypts, tries to, the part between
and also throws away every thing else.

I would like to have an option reproducing the uncrypted part of STDIN to STDOUT,
instead of throwing it away.

An example of need is to transform a bunch of encrypted emails to
their deciphered version, the Unix philosophy way, ie, suitable in a pipe, or more.

Something like:

cat mailbox.txt | gpg --decrypt --batch --no-tty --passphrase=$P --allow-multiple-messages  2>/dev/null | more

Three questions:

1) Is it a complicated task, considering the gpg code architecture?

2) Can someone who see the whole gpg picture give me some clue and a starting point?

3) What is the eagerness to include such an option in gpg?
    Is it a clear NO or a YES or Why not if done well?

4) How about the option name?

--cat    # act like cat
--parrot # be a parrot
--copy-stdin-to-stdout # long and less cryptic


Au revoir,
Gilles Lamiral. France, Baulon (35580)
mob +33 6 19 22 03 54
tel +33 9 51 84 42 42
fax +33 9 56 84 42 42

More information about the Gnupg-devel mailing list