For example, there is the N number of variables, "var_1", "var_2" and so on, the script takes as arguments only the number of the variable, and its contents should be in the new var variable.
If you execute this script, passing it as argument "1":
#!/bin/bash var_1='MY_VAR_NUMBER_1' var_2='MY_VAR_NUMBER_2' var_3='MY_VAR_NUMBER_3' var="var_$1" echo $var
That script will return:
And we need the contents of the variable "var_1". To do this, the "echo" command should look like this:
In this case, it will return: