Shell脚本中的脚本变量

时间:2011-11-29 06:02:59

标签: bash shell applescript

我在shell脚本中运行以下行:

osascript -e 'tell application "System Events" to keystroke "$1"'

我希望能够使用applescript键入$ 1。在剧本之后我输入的终端是否有任何方式让$ 1出现?现在,它只是字面上的$ 1。

1 个答案:

答案 0 :(得分:4)

将它们放在单引号中,如下所示 -

osascript -e 'tell application "System Events" to keystroke '$1''