Skip to content

Instantly share code, notes, and snippets.

@benmatselby
Last active August 29, 2015 14:23
Show Gist options
  • Save benmatselby/3a5c44afab7be20a3b69 to your computer and use it in GitHub Desktop.
Save benmatselby/3a5c44afab7be20a3b69 to your computer and use it in GitHub Desktop.
Open terminal to a set of servers using apple script
on run argv
tell application "Terminal"
set profile to item 1 of argv
set platform to item 2 of argv
set serverCount to item 3 of argv
tell app "Terminal" to set current settings of first window to settings set profile
repeat with theIncrementValue from 1 to serverCount
tell application "System Events" to keystroke "t" using {command down}
do script "ssh " & platform & "-prod-app0" & theIncrementValue in front window
end repeat
end tell
end run
@blongden
Copy link

👍 Nice 😀

@benmatselby
Copy link
Author

Now with variables from the bash script

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment