-- Launch iTerm and log into multiple servers using SSH tell application "iTerm" activate -- Read serverlist from file path below set Servers to paragraphs of (do shell script "/bin/cat $HOME/serverlist") repeat with nextLine in Servers -- If line in file is not empty (blank line) do the rest if length of nextLine is greater than 0 then set server to "nextLine" set term to (current terminal) -- Open a new tab tell term set Lsession to (make new session at the end of sessions) tell Lsession -- Set tab name to name of server set name to nextLine -- SSH to host as with default username exec command "ssh " & nextLine -- Absolutely moronic time killer since its faster than 1 sec sleep (get errors if we spawn to fast) do shell script "/bin/echo" do shell script "/bin/echo" do shell script "/bin/echo" do shell script "/bin/echo" do shell script "/bin/echo" end tell end tell end if end repeat -- Close the first tab since we do not need it terminate the first session of the current terminal end tell