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 ?
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