Parsing the output of --list-keys

Jonas Steverud d4jonas@dtek.chalmers.se
17 Jan 2000 17:45:06 +0100


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

Tony Nelson <tnelson@techie.com> writes:


> I'm not sure if this is exactly what your after.. but I think it might help,
> or at least make the output easier to parse... try:
>
> gpg --list-keys --with-colons

> 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::
Thanks, thi already told me this privately and I decided then that this does not help. The problem to get the "Tony Nelson <tnelson@conceptech.com>" is not hard since the number of characters from the left marging is 31 (i.e. (forward-char 31)). The problem is to get "Tony Nelson", "(optional comment)" and "tnelson@conceptech.com". I have found a way of doing this with regexps so the problem is solved, but if --with-colons had put colons between the wanted parts too, I would use it. I mostly asked in the eventuallity there existed some good way to produce a parse-friendly list (like --with-colons which I did not know about before-hand - forgot to RTFM). I have a working solution, I was hoping there where a easier way. Thanks anyway. - -- ( 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> iD8DBQE4g0cPYFmxFYdMVIkRAv3xAJ487UjEGTmxjbWrr6Pto7Vta+4UMgCcDs4A YxKhIf5SX+qTqkbopM9UgUE= =Vcm7 -----END PGP SIGNATURE-----