Created
September 22, 2010 21:39
-
-
Save octosteve/592635 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stdin, stdout, stderr, pid = Open4::popen4 "pgp --key-list" | |
pgps = stderr.select {|x| x.chomp if x =~ /0x/ } | |
# to parse Key list | |
@orgs = pgps.inject([]){|enum, pgp| enum << {:hex_id =>pgp[29..38], :org_id => pgp[40..pgp.length].chomp} } | |
@orgs.each.with_index{ |org, index| puts "#{index}. #{org[:hex_id]} belongs to #{org[:org_id]}" } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Alright... that shit is like money in the bank ;)