I have 4 machines, every machine(centos) has a ifcfg-bond1 with identical ip address 10.0.0.3How to using bash and sed substituting 10.0.0.3 with a incremental value?I want to obtain something like thismachine1        -> 10.0.0.1machine2        -> 10.0.0.2machine3        -> 10.0.0.3machine4        -> 10.0.0.4I have tried a script with let and bash on ssh but for all machine i get 10.0.0.2(using let+1)for i in machine{1..4};do ssh $i var=1;export var;let var=var+1;echo 10.0.0.$var;doneAny suggestion?Thanks
script for substition incremental
bash;scripting
for i in {1..4};do ssh machine$i echo 10.0.0.$i;doneIn this code I keep the numbers separate for a bit longer: I only have the number, not the word machine. I then use it to create the address of the machine for ssh and for the echo.