我试图垂直发射多个iTerm2制表符,我得到一个错误。
下面是我正在运行的脚本:
#/bin/bash
tell application "iTerm2"
tell current session of current tab of current window
write text "ssh host"
repeat 1 times
split vertically with default profile
end repeat
end tell
tell second session of current tab of current window
write text "ssh host"
end tell
end tell
我得到以下错误:
./iterm2.sh: line 3: tell: command not found
./iterm2.sh: line 4: tell: command not found
write: text is not logged in on ssh host
./iterm2.sh: line 6: repeat: command not found
split: vertically: No such file or directory
./iterm2.sh: line 8: end: command not found
./iterm2.sh: line 9: end: command not found
./iterm2.sh: line 10: tell: command not found
write: text is not logged in on ssh host
./iterm2.sh: line 12: end: command not found
./iterm2.sh: line 13: end: command not found
这是一个AppleScript,不是bash。
将she-bang改为:
#!/usr/bin/osascript