I am trying to parse a csv file in the below 'name-value pair' format and then use the values corresponding to the name.
Type:G,Instance:instance1,FunctionalID:funcid,Env:dev,AppName:appname
Type:A,AppName:appname,ProcessName

rocess1.ear,Machine:machine1|Mode:FT|Setting:P,Machine:machine2| Mode:FT|Setting:B
Type:A,AppName:appname,ProcessName

rocess2.ear,Machine:machine1|Mode:FT|Setting:P,Machine:machine2| Mode:FT|Setting:B
I have to get the the value instance1(from Instance) dynamically by looking for Type:G and similarly other variables corresponding to their name pair. And then from Type:A, I have to compare AppName with Type:G and get the variables corresponding to the name pairs. Please note that if there are more than two values, there is an other delimitter '|' - Machine:machine1|Mode:FT|Setting:P
I am trying to use sed , cut etc., but couldn't hit the right logic. I really appreciate if I get a solution here.
Thanks,
Chiru