My find | grep is this:
Code:
find ../xml | xargs grep -s '<parameter name="ldapPassword">'
which returns a string like this:
../xml/file.xml:<parameter name="ldapPassword">Password</parameter>
The result I need is this:
file = file.xml
password = Password
This is what I was using to get the password:
Code:
find ../xml | xargs grep -s '<parameter name="ldapPassword">' | sed -e 's/.*ldapPassword">//' -e 's/<\/parameter.*//'
But I'm not sure how to get multiple strings. Well I have an idea of how to do it, but it does not seem like the most efficient. Should I be using Perl instead?