Hi everyone. Well i am new to linux shell and i can't understand any regexp :(
Here is my question: I have a directory called /var/visitors and under this directory, i have directories like a, b, c, d. In each of these directories, there is a file called list.xml and here is the content of list.xml belonging to /var/visitors/a directory:
<key>Name</key>
<string>Mr Jones</string>
<key>ID</key>
<string>51</string>
<key>Len</key>
<string>53151334</string>
what i want to do is to merge Name field with its corresponding string and merge ID field with its corresponding string.. I don't need other fields..
Name: Mr Jones
ID: 51
---
Name: Ms Maggie
ID: 502
Here is what i can write:
cd /var/visitors
find -name "list.xml" | xargs grep ?????
Well please help me :(( I am really stuck I need to write this asap :( Thanks for your attention.