Created
July 31, 2012 18:24
-
-
Save robie1373/3219221 to your computer and use it in GitHub Desktop.
Get all com.apple.blah defaults
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 | |
(`defaults domains`).split(', ').each do |thing| | |
# p thing uncomment to watch the domains | |
if thing.match /com\.apple.*/ | |
default = "\n\n#{thing}\n" | |
default << `defaults read #{thing}`.to_s | |
p default | |
File.open('defaults.txt', 'a+') { |f| f.write(default) } | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment