You could use a helper variable to build the name of the target variable and then use variable indirection:
zmx_var=zmx_$1
echo -e "${!zmx_var} $tag $1${zmx_no_color}: $line"
You could use a helper variable to build the name of the target variable and then use variable indirection:
zmx_var=zmx_$1
echo -e "${!zmx_var} $tag $1${zmx_no_color}: $line"