Well to start.
You shouldn't use the "execute in variable" method for this.
I would do something like this if you want to do this:
# stations="space separated list with stations"
# Example below
stations="station1.com:8000 station2.com sub.domain.station3.com:9000"
for i in $stations; do
The way you're doing it will probably "work" but it's not the way it should be done and as you've experienced some iffy things happens
Executing something into a variable is useful when you need to modify the output of another program (or just need the output for some reason).
hello="Hello world :)"
hello=$(echo $hello | replace 'Hello' 'Goodbye')
More advanced examples can be found on google, but you can pretty much do anything that just spits output to standard output (stdout)
edit: Oh sry, I think i missunderstood you. You want a script that starts playing a specific station when you press a specific button?
case $1 in
Maybe something like that would be better? when you run that you'll just pass it like this: ./script.sh 1
That will run "mplayer station.com", if it would have been a 2 you might guess what it'd do