I have a large string which is a collection of key (space)+ value, i.e key followed by one or more space and then value.
Now i need to change the value of a particular key using sed, awk, grep etc. in unix environment.
eg. of string: -Key1 Value1 -Key2 Value2 -Key3 Value3
I need a new string that is same as above only Value2 will be replaced by NewValue3