I have a string Contain key=value format separated by # I am trying to replace the '=' char occurrences with ':' in the value of TITLE using BASH script.
"ID=21566#OS=Linux#TARGET_END=Synchronica#DEPENDENCY=Independent#AUTOMATION_OS=Linux#AUTOMATION_TOOL=JSystem#TITLE=Session tracking. "DL Started" Status Reported.Level=none"
later on i am parsing this string to execute the eval operation
eval $(echo $test_line | sed 's/"//g' | tr '#' '\n' | tr ' ' '_' | sed 's/=/="/g' | sed 's/$/"/g')
When the sed 's/=/="/g' section will also change ..Level=none to
Level="none
This leads to
eval: line 52: unexpected EOF while looking for matching `"'
What will be right replace bash command to replace my string ?
/gmodifier fromsed 's/=/="/g'.