I have some working script, in start of which I enter start parameters (server IP, user login and root login), and every time, when I need to restart this script on another server, I need to edit script, to change server IP variable. How can I change this, to enter a bunch of IP addresses in variable(s), maybe in some array and when script finishes with first IP, it goes to second, and so on to the end of IP list?
Script example:
##!/bin/bash
serv_address="xxx.xx.xx.xxx"
"here goes some script body"