The line is like this
+abc+def+mgh+ddsdsd+sa
i.e. words seperated by +. There is a plus in the beginning.
i want to conver this line to
abc, def, mgh, ddsdsd, sa
please provide the logic in the form of a shell script
Thanks in advance
The line is like this
+abc+def+mgh+ddsdsd+sa
i.e. words seperated by +. There is a plus in the beginning.
i want to conver this line to
abc, def, mgh, ddsdsd, sa
please provide the logic in the form of a shell script
Thanks in advance
Skyineyes,
Do not break the rules duplicating posts:
You will just make it more difficult for you to find a solution.
Give time to the members to work on the issue.
You can do something like that :
line=+abc+def+mgh+ddsdsd+sa"
new_line=$(echo "$line" | sed 's/^+//;s/+/, /g')
str="+abc+def+mgh+ddsdsd+sa"
echo ${str#?} | tr '+' ','