So take the following script as an example:
PROFILE1=profileName
SERVER1=serverName
PROFILE2=profile2Name
SERVER2=server2Name
VAR_$PROFILE1_$SERVER1=/home/$PROFILE1/$SERVER1/data
VAR_$PROFILE1_$SERVER2=/home/$PROFILE1/$SERVER2/data
VAR_$PROFILE2_$SERVER1=/home/$PROFILE2/$SERVER1/data
echo "$VAR_$PROFILE1_$SERVER1"
That is the basics of what I am attempting to accomplish. This may not be the best way to go about it, but for someone who is fairly new to bash scripting this was my first thought on how to do it.
I need to be able to only change one location in my script file and be able to add new "VAR_..." as needed for the system I am on.
Is this even possible? If not then if you understand what I am attempting to accomplish could you suggest an alternative?
$VAR_profileName_serverNameby replacing what$PROFILE1and$SERVER1contain?