diff --git a/bin/.gitignore b/bin/.gitignore index 9949c30..c9588f1 100644 --- a/bin/.gitignore +++ b/bin/.gitignore @@ -1,3 +1,4 @@ # instantiated files uca-apply uca-manip +parse-gpg2-k diff --git a/bin/parse-gpg2-k.in b/bin/parse-gpg2-k.in new file mode 100644 index 0000000..eff256e --- /dev/null +++ b/bin/parse-gpg2-k.in @@ -0,0 +1,9 @@ +#!@perl_bin@ +use warnings; +use strict; +my ($pubkey,$tmp,$name,$email); +while(<>){ # read from STDIN + $pubkey = $tmp if(($tmp) = m#^pub\s*[^/]*/([a-z0-9]+)\s*#ig); + ($name,$email) = m#^uid\s*(?:\[[^\]]*\])?\s*(.*)\s*<([^>]*)>#ig; + print join("\n",$pubkey,$name,$email),"\n" if($pubkey and $name and $email); +};