I have a variable with a list of IPs, and I want to replace each IP with http://
at the beginning and :8083
at the end.
My question is similar to this other question: Append port number to each item in comma separated list of IPs but I don't want each IP to be surrounded by quotes each.
raw_ips="100.100.10.10,200.200.10.10,100.201.10.10"
address=magic-happens-here
The variable address
should contain: http://100.100.10.10:8083,http://200.200.10.10:8083,http://100.201.10.10:8083
. It's preferable that the magic-happens-here
is some bash substitution trick similar to the one used on the linked-to question above (because of its brevity).