tr command with uname -n

Using the command :
echo $eup_terminal_code | tr -s 'mil vrn qcm' 'mci pql qcm'
it works,but this translation changes depending on the system.

I'd like to define the following variables ,one for each system :

mil22h_from='mil vrn frl'
mil22h_to='mci vci fci'

czhs0362_from='mil vrn flr'
czhs0362_to='mot vot fot'

I'd like to use a command like this :
echo $eup_terminal_code | tr -s uname-n_from uname -n_to
but it doesn't work.

tks in advance
:frowning:

You are not using the right command. tr command replaces character by character and not a strying by another string

Use sed command

echo $eup_terminal_code | sed "s/uname-n_from/uname -n_to/"

The result I'd like to obtain is the following :
depending on the system name 'uname -n' a variable content should be replaced
with another string,example :
for mil22h system mil with moc flr with foc vrn with moc
for mil21h system mil with mac flr with fac vrn with vac
tks in advance

---------- Post updated at 07:01 PM ---------- Previous update was at 06:33 PM ----------

Let's say that I'd like to change a content of variable defined on change_from with the content defined on change_to,example mil with moc ,flr with foc :
change_from="mil:flr:vrn"
change_to="moc:foc:voc"
how can i do this ?

echo 'mil22h system mil with moc flr with foc vrn with moc' |sed 's/mil/moc/g;s/flr/foc/g;s/vrn/moc/g'

or, per your later post:

echo 'mil22h system mil with moc flr with foc vrn with voc' |sed 's/mil/moc/g;s/flr/foc/g;s/vrn/voc/g'

this will work under the condition of "if 'uname -n' == mil22h ..............
But is there a way to solve this issue without change the source,I mean using only variables : example
mil22h_from(system name)="mil:flr:vrn"
mil22h_to(system name)="moc:foc:voc"
mil06h_from="mil:flr:vrn"
mil06h_to="mac:fac:vac"
I'd like to avoid to change the sourec and in case os a new server only two new variables will be necessary :
new system name_from="xxx:xxx:xxx:"
new system name_to="yyy:yyy:yyy"
Depending on the result of "uname -n" the command will choose the right variable
tks all of you in advance for your help