QUESTION: Can the gpg output be captured to a file?

darren chamberlain
Mon Feb 24 16:26:02 2003

* Chuck Fennimore <cfennimore at> [2003-02-24 06:15]:
> I am trying to do automated batch processing of encrypted email and I
> need to be able to capture the standard screen output from the
> signature verify and the decryption functions. At one point I saw a
> file created called siglog that contained the output but I was never
> able to repeat the process. But basically that is what I want, to be
> able to pipe the output to a file, or append it to a log file. I have
> tried using the pipe ">" command and get nothing. I can't find
> anything in the documentation that talks about a siglog file either.
> Your help would be greatly appreciated.

Send the shell cmomand you are using, along with info on the shell.

In general, with a sh-derived shell (sh, ksh, bash), redirecting output
is done with >, as you indicate:

  command [options] > outputfile

This will clobber outputfile for each run.  Appending to the output file
uses >> :

  command [options] >> outputfile

This won't capture errors, though; to do that, use:

  command [options] 2> errorfile

You can also use 2>> to append to the error file.

These can be combined as well:

  command [options] >> outputfile 2>> errorfile

Finally, to get both the output and errors in the same file:

  command [options] 2>&1 >> outputfile

If you need more help, send the literal command you are trying to use.
If you are using a broken^Wdifferent shell (csh, tsch), the syntax is
slightly different; hopefully someone else can help you with that.


I'm not sure which upsets me more: that people are so unwilling to
accept responsibility for their own actions, or that they are so eager
to regulate everyone else's.
    -- Kee Hinckley