#!/bin/bash for i in 2 3 4 5 6 7 8 9 10 11 12 #for i in 1 do scp update_gss_home.sql gazelle@ehealthsuisse$i.ihe-europe.net:/home/gazelle ssh gazelle@ehealthsuisse$i.ihe-europe.net "sudo sed -i 's/URL/ehealthsuisse$i/g' /home/gazelle/update_gss_home.sql" ssh gazelle@ehealthsuisse$i.ihe-europe.net "psql -U gazelle -d tls < update_gss_home.sql" done