in the following bash script , we want to run in parallel several scripts on remote machines
ssh $server_a /tmp/activate_nodes.bash &
ssh $server_b /tmp/activate_services.bash &
ssh $server_c /tmp/activate_components.bash &
ssh $server_d /tmp/activate_nfs.bash &
.
.
.
not sure about to put the "&
" on the end of the script or some other approach ?
Note the target is to run all 25 scripts on 25 diff machines , so all runing of the scripts will be in few second , while scripts proccess on remote machine will still run until end
Running these in parallel is fine, except for the interleaved output. To save output for later analysis, you can also "tee" the logs for later inspection: