Skip to content

Instantly share code, notes, and snippets.

@zunda
Created September 17, 2009 20:54
Show Gist options
  • Save zunda/188703 to your computer and use it in GitHub Desktop.
Save zunda/188703 to your computer and use it in GitHub Desktop.
A ruby script to dump content from PStore files. Happened to be similar with http://www.machu.jp/diary/20090915.html#p01
#!/usr/bin/env ruby
# pp-pstore.rb: dumps data from PStore files
#
# Copyright 2007 zunda <zunda at freeshell.org>
#
# Permission is granted for use, copying, modification, distribution,
# and distribution of modified versions of this work as long as the
# above copyright notice is included.
#
require 'pstore'
require 'pp'
ARGV.each do |path|
begin
PStore.new(path).transaction(true) do |db|
pp db
end if File.exist?(path)
rescue
puts $!
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment