에 의해 AppleScript로하는 따옴표를 전달합니다.은 내가 어떻게 게이트웨이에 의해 SSH를 로그인 AppleScript로 사용하고 zsh을 별칭
alias sshtoxxxx="osascript ~/workspace/script/applescript/fox/ssh_xxxx.applescript [email protected] hFVDa4d\'vLe"
암호가 '포함, 그것은 로그인 할 수 있습니다.
와 AppleScript로 아래입니다 또한 당신은 zsh을하거나 배쉬에서 이중 인용 된 문자열에 작은 따옴표를 가질 수 없습니다
on run argv
set arg1 to (item 1 of argv)
set arg2 to (item 2 of argv)
testFunc(arg1,arg2)
sshxxx(arg1,arg2)
end run
on sshxxx(target,password)
tell application "iTerm"
reopen
activate
tell the current window
create tab with default profile
tell the current tab
tell the current session
write text "clear"
write text "logfin the gate way host"
delay 0.2
repeat until "xxxxx" is in contents
end repeat
write text "clear"
set targetText to "ssh " & target
write text targetText
repeat until "password" is in contents
end repeat
write text password
end tell
end tell
end tell
end tell
end sshxxx
나는'iTerm'이 작동하는 방법을 알고하지 않습니다하지만이 정확하지 않은 password' – vadian