I'm trying to write a simple Bash script. I have a simple "template" variable:
template = "my*appserver"
I then have a function (get_env()) that returns the values dev, qa, or live. I'd like to call get_env and then string-replace the template variable with get_env's return value and swap it out with the asterisk. So:
# Returns "dev"
server = get_env
# Prints "mydevappserver"
template = string_replace(server, template)
Or:
# This time, it returns "live"
server = get_env
# Prints "myliveappserver"
template = string_replace(server, template)
What should I be using in lieu of this string_replace() function to accomplish the binding?