Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Pull the username and password out of the xml file and into local vars
- # Run the output through sed to escape & and _ characters for MySQL
- # Note: the shell quoting here gets a little rough. The final command is:
- # sed -e 's/[%_]/\&/g'
- read dbuser dbpass <<<$(xmap \
- 'xmlstarlet sel -t -v "//controller-config/database/@" '${XML_FILE}' \
- | sed -e '\''s/[%_]/\\\\&/g'\' \
- username password)
Add Comment
Please, Sign In to add comment