Detached signature as a pass-through filter?

David Shaw dshaw at jabberwocky.com
Sat Aug 9 15:54:01 CEST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, Aug 08, 2003 at 12:11:14PM -0400, Michael Young wrote:
> I'd like to use GnuPG to sign an intermediate result, something like:
> 
>     command ... | gpg --detach-sign -o signature_file | other_command ...
> 
> This specific incantation doesn't work.  Standard output is empty.
> 
> Is there any way to convince GnuPG to pass the input through to
> standard output?  (And if not, would it be reasonable to add a
> switch to do this?)

Why not use "tee"?  That's the standard resource for constructing a
pipeline when a command consumes data.

echo "foo" | tee tempfile | gpg --detach-sign -o sigfile.gpg ; cat tempfile

David
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3rc2 (GNU/Linux)
Comment: Key available at http://www.jabberwocky.com/david/keys.asc

iEYEARECAAYFAj807zMACgkQ4mZch0nhy8lWjQCfeOjUIncyQsVvZZd2kI8p+7mA
izsAniHjPNpPcoxPBXjFHAfwOgVWjrpp
=IkmK
-----END PGP SIGNATURE-----




More information about the Gnupg-devel mailing list