Skip to content

Instantly share code, notes, and snippets.

@ranman
Created August 10, 2012 20:52
Show Gist options
  • Save ranman/3317756 to your computer and use it in GitHub Desktop.
Save ranman/3317756 to your computer and use it in GitHub Desktop.
A poorman's chef
set hostList to {"jsl1", "jsl2", "jsl3", "jsl4", "jsl5", "jsl6", "jsl7", "jsl8"} as list
tell application "iTerm"
activate
set myTerm to (make new terminal)
tell myTerm
repeat with hostItem in hostList
set Lsession to (launch session "Default Session")
tell Lsession
write text "ssh " & hostItem
end tell
end repeat
end tell
end tell
tell application "System Events"
tell process "iTerm"
keystroke "I" using {command down}
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment