So here is my problem. How can I extract those strings into 3 variables with a bash script?
So out of this:
<key>GameDir</key> <string>C:/Program Files/</string> <key>GameEXE</key> <string>C:/Program Files/any.exe</string> <key>GameFlags</key> <string>-anyflag</string>
I want:
GameDir=C:/Program Files/
GameEXE=C:/Program Files/any.exe
GameFlags=-anyflag
Example Script:
echo GameDir
echo GameEXE
echo GameFlags
Example Output:
C:/Program Files/
C:/Program Files/any.exe
-anyflag
The order of the keys is not changing, only the strings itself. I am using OS X, so it needs to be a command that works out-of-the-box on OS X. Maybe this could work with sed?
Thanks Drakulix