If you need to execute the FOR loop the N number of times, and this value will be set by a variable, the script will look like this:
For example, there is a file "/home/artem/IP" with IP addresses on which you want to execute a remote command, the FOR loop will look like this:
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": my_script.sh That script will return: var_1 …
Continue reading " BASH – The variable content of which refers to another variable"