Quantcast
Channel: How to grep an XML tag and get only the value inside the quotes after it? - Unix & Linux Stack Exchange
Browsing all 2 articles
Browse latest View live

Answer by nxnev for How to grep an XML tag and get only the value inside the...

This works for me: grep -P -o -e '(?<=name=").*?(?=")'

View Article



How to grep an XML tag and get only the value inside the quotes after it?

I'm trying to get these values from the XML format below: USA GERMANY <country name="USA" id="TEST1" password="123" /> <country name="GERMANY" id="TEST2" password="456" /> I was checking...

View Article
Browsing all 2 articles
Browse latest View live




Latest Images