-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPROD-US-CORE.scpt
35 lines (30 loc) · 1016 Bytes
/
PROD-US-CORE.scpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
set hostnames to {"va1-p1-flnkm-01", "va1-p1-flnkm-02", "va1-p1-flnkw-01", "va1-p1-flnkw-02", "va1-p1-flnkw-03","va1-p1-flnkw-04"}
if application "iTerm" is running then
tell application "iTerm"
--creating new window
create window with default profile
delay 1
--starting loop
set num_hosts to count of hostnames
set num_tabs to count of hostnames
repeat with n from 1 to num_hosts
--current tab
tell current tab of current window
select
tell current session
write text "ssh " & (item n of hostnames) & ".ctcolo.dom"
end tell
end tell
delay 1
--creating new tab
if num_tabs > 1 then
tell current window
create tab with default profile
set num_tabs to num_tabs - 1
end tell
end if
end repeat
end tell
else
activate application "iTerm"
end if