I'm parsing data in the following format:
prop1=value1:prop2=value2:prop3=value3+prop1=value4:prop2=value5
- parts of the string are delimited by
+
- properties can appear in any order
- the desired output is the value of prop2 from the string part where prop1 has a particular value (input)
Can I achieve this through standard unix command-line tools, or do I have to write a small C program?
Edit - for the line shown, this is the desired functionality:
input: value1 -> output: value2
input: value4 -> output: value5