Last active
August 29, 2015 14:23
-
-
Save benmatselby/3a5c44afab7be20a3b69 to your computer and use it in GitHub Desktop.
Open terminal to a set of servers using apple script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
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
👍 Nice 😀