Parsing the output of --list-keys

Tony Nelson
Fri, 14 Jan 2000 10:21:32 -0500

Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: quoted-printable

  I'm not sure if this is exactly what your after.. but I think it might he=
or at least make the output easier to parse...  try:

gpg --list-keys --with-colons

my key lists like this:
[tnelson@borneo tnelson]$ gpg --list-keys --with-colons
pub:u:1024:17:51FF9A17136C5B87:1999-04-24::59:-:Tony Nelson <tnelson@techie=
uid:u::::::::Tony Nelson <>:
uid:u::::::::Tony Nelson <>:

Which contains all three of my e-mail addresses in a 'easy to parse' foramt=

Hope this helps

On Thu, Jan 13, 2000 at 08:34:39PM +0100, Jonas Steverud wrote:

> Hash: SHA1
> I work on a set of elisp functions that will syncronize GnuPG's public
> keyring and the BBDB's pgp-mail field (see mc-bbdb.el and bbdb-pgp.el,
> don't know where you can get the latter but the former is available
> from <URL:>).
> My question is; is there an easy way of getting a list of who is in
> the keyring and his email addresses?
> What I want is something like:
> "John A" email1@somewhere email2@somewhere
> "Anne" a@b.c d@.e.f
> It would be much easier for me to parse then the current output of
> - --list-keys. I assume I can write something in awk but I though I
> might ask first since I'm bored of inventing the wheel over and over
> again.
> Clear as mud?
> - --=20
> ( GPG/PGP key @ ! Wei Wu Wei )
> ( U2MoL, Roleplaying, LaTeX, Emacs/Gnus, SCWM, etc. ! To Do Without Do )
> Version: GnuPG v1.0.0 (SunOS)
> Comment: Processed by Mailcrypt and Gnu Privacy Guard <>
> iD8DBQE4fijOYFmxFYdMVIkRAgJOAJ4/smX7RxUEGarTnviGl50THtKMywCcDhDj
> HqHm91pVAjK3UVMogbSeJNs=3D
> =3DeGJW
--=20 Tony Nelson Standard Disclaimers A= pply=20 --RnlQjJ0d97Da+TV1 Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.1 (GNU/Linux) Comment: For info see iD8DBQE4fz78Uf+aFxNsW4cRAU5LAKDE7Ea4y+qhzcMwA/EUr40k/glFSACfVQRA jN/wH9jz5tiMdTfRnwFSxnk= =0PA9 -----END PGP SIGNATURE----- --RnlQjJ0d97Da+TV1--