Sureshchandra Jarugula Sureshchandra Jarugula - 10 months ago 66
Bash Question

separate two stings with double quotes

In my script the string value is coming like below


I need output is

I tried with below command, I am getting output as

echo ${QUEUE_NAME} | sed s/:/\"\,\"\/g

Could you please help me, Is there any better command to use.

sat sat
Answer Source

You can try this sed:

$ echo $QUEUE_VALUE | sed -e 's/[^:]*/"&"/g' -e 's/:/,/g'