Created
September 17, 2009 20:54
-
-
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
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
#!/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