The team is divided into words sed, -e, 's/.*Current, IP, Address:, //'etc, so the first team in the program sedreally begins with 'that is not a valid command sed. Use an array instead and instead:
cmd=(curl -s)
pipecmd=(sed -e 's/.*Current IP Address: //' -e 's/<.*$//')
"${cmd[@]}" "$ipservice" | "${pipecmd[@]}"
, echo "$(command)" command. , , ( ).