Created
October 3, 2011 17:14
-
-
Save joshbirk/1259633 to your computer and use it in GitHub Desktop.
Shell script to get password out of Keychain (OSX), via http://blog.macromates.com/2006/keychain-access-from-shell/
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
security 2>&1 >/dev/null find-generic-password -ga $1 \ | |
|ruby -e 'print $1 if STDIN.gets =~ /^password: "(.*)"$/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment