Detached signature as a pass-through filter?

John Clizbe JPClizbe at
Sat Aug 9 17:59:02 CEST 2003

Hash: SHA1

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?)

using tee to split the output stream before you pipe to gpg would be the
standard way to do it (I'm sure named pipes & file descriptors could be
woven in some way)

command ... | tee <somefile> | gpg --detach-sign -o sig_file; cat
<somefile> | other_command ...

If you're on Windows, you can get tee from Cygwin, MinGW/MSys, UWin, or
Services for Unix

- --
John P. Clizbe                   Inet:   JPClizbe(a)comcast DOT nyet
Golden Bear Networks             PGP/GPG KeyID: 0x608D2A10
  "Most men take the straight and narrow. A few take the road less
traveled.  I chose to cut through the woods."
Version: GnuPG v1.2.2-nr2 (Windows 2000)
Comment: Using GnuPG with Mozilla -


More information about the Gnupg-devel mailing list