unnecessary newline with --print-md

Hauke Laging mailinglisten at hauke-laging.de
Wed May 29 21:38:45 CEST 2013


I just noticed something which one might consider a bug.

gpg --print-md prints the file path and then the requested digest. If the file 
path is "too long" then a newline is inserted after it. That is nice if you 
just want to read the output.

The strange effect is that this happens if the output is piped, too. Even with 
--batch and --no-tty. In my experience the usual behaviour of console programs 
is that they do without the fancy terminal related stuff if they detect that 
their output is not connected to a terminal.

I know that --with-colons can be used with --print-md, too, and that this 
problem can be solved with redirecting the file to stdin but I thought this 
behaviour might be unintended.

PGP: 7D82 FB9F D25A 2CE4 5241 6C37 BF4B 8EEF 1A57 1DF5 (seit 2012-11-04)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 572 bytes
Desc: This is a digitally signed message part.
URL: </pipermail/attachments/20130529/f66e3a2f/attachment.sig>

More information about the Gnupg-devel mailing list