I want to add ' in front and behind my variable and replace one character inside.
Here is my input: peter:chris
Here is my expected output: 'peter-chris'
I have tried, but my code is failing. My echo prints nothing. Code attempt attached.
Appreciate your help.
if [ -n "$string" ]
set string = `echo "'"$string"'" | sed "s/:/-/"`