[TriLUG] RE: [TNTUG-discussion] gpg in batch - capturing output to a log file

John Hensley johnhe at msn.com
Fri Feb 6 21:01:26 EST 2004


Kevin,

 

It looks like pgp is sending it's output to stderr instead of stdout. You
can still get the output by changing the redirection symbol to "2>" so that
stderr is redirected to foo.log:

 

Pgp -e -v -r joe.blow at company.com -o foo.pgp %1 2> foo.log

 

Or you can redirect both stdout and stderr to foo.log using:

 

Pgp -e -v -r joe.blow at company.com -o foo.pgp %1 >foo.log 2> &1

 

 

.John

 

  _____  

From: Kevin Flanagan [mailto:kevin at flanagannc.net] 
Sent: Friday, February 06, 2004 7:29 PM
To: trilug at trilug.org; TNTUG-discussion at yahoogroups.com
Subject: [TNTUG-discussion] gpg in batch - capturing output to a log file

 

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

I'm trying, on a Windows system, to do encryption of a file and
logging the output to a log file, that will be used by the user, and
later administrators or auditors to verify the process.  Something
like this.

gpg -e -v -r joe.blow at company.com -o foo.pgp %1 > foo.log

I need to make the output be .pgp extention, this part works just fine.


The log file is the issue, it creates foo.log, but the output of the
gpg command isn't there.


Suggestions???


Thanks,






More information about the TriLUG mailing list