Skip to content

Instantly share code, notes, and snippets.

@svenvarkel
Created October 28, 2013 10:39
Show Gist options
  • Save svenvarkel/7194716 to your computer and use it in GitHub Desktop.
Save svenvarkel/7194716 to your computer and use it in GitHub Desktop.
This is a useful oneliner for reading Magento database password from local.xml in command line
#!/bin/bash
# run in your app/etc folder
grep -o -P "<password><\!\[CDATA\[([\w]*)\]\]><\/password>" local.xml | sed -e 's|<password><\!\[CDATA\[||g' | sed -e 's|\]\]></password>||g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment