Last active
May 14, 2016 19:17
-
-
Save thomashartm/224364937fdbdb6d9b6b to your computer and use it in GitHub Desktop.
Parse xml elements from settings.xml into shell variables
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
username=$(grep -o '<username>.*</username>' ~/.m2/settings.xml | sed 's/\(<username>\)//g' | sed 's/\(<\/username>\)//g') | |
password=$(grep -o '<password>.*</password>' ~/.m2/settings.xml | sed 's/\(<password>\)//g' | sed 's/\(<\/password>\)//g') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment