Parsing the output of --list-keys

Tony Nelson tnelson@techie.com
Fri, 14 Jan 2000 10:21:32 -0500


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

Jonas,=20
  I'm not sure if this is exactly what your after.. but I think it might he=
lp,
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 tnelson@techie.com
pub:u:1024:17:51FF9A17136C5B87:1999-04-24::59:-:Tony Nelson <tnelson@techie=
.com>:
uid:u::::::::Tony Nelson <tnelson@conceptech.com>:
uid:u::::::::Tony Nelson <tnelson@partysite.com>:
sub:u:2048:16:9F67F69212171284:1999-04-24::59::

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

Hope this helps
Tony

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

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>=20
>=20
> 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:http://www.kaidea.freeserve.co.uk/elisp.html>).
>=20
> My question is; is there an easy way of getting a list of who is in
> the keyring and his email addresses?
>=20
> What I want is something like:
> "John A" email1@somewhere email2@somewhere
> "Anne" a@b.c d@.e.f
>=20
> 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.
>=20
> Clear as mud?
>=20
> - --=20
> ( GPG/PGP key @ www.dtek.chalmers.se/~d4jonas/ ! Wei Wu Wei )
> ( U2MoL, Roleplaying, LaTeX, Emacs/Gnus, SCWM, etc. ! To Do Without Do )
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.0.0 (SunOS)
> Comment: Processed by Mailcrypt and Gnu Privacy Guard <www.gnupg.org>
>=20
> iD8DBQE4fijOYFmxFYdMVIkRAgJOAJ4/smX7RxUEGarTnviGl50THtKMywCcDhDj
> HqHm91pVAjK3UVMogbSeJNs=3D
> =3DeGJW
> -----END PGP SIGNATURE-----
>=20
--=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 http://www.gnupg.org iD8DBQE4fz78Uf+aFxNsW4cRAU5LAKDE7Ea4y+qhzcMwA/EUr40k/glFSACfVQRA jN/wH9jz5tiMdTfRnwFSxnk= =0PA9 -----END PGP SIGNATURE----- --RnlQjJ0d97Da+TV1--