我有一个bash脚本:
#!/bin/bash
function foo() {
terminator
xdotool type 'myalias'
xdotool key Return
xdotool key ctrl+shift+t
xdotool type 'cd ~/git/apps/myapp/client && gulp'
xdotool key Return
}
foo我从一个关键的快捷方式运行这个脚本。
它打开终端,但只在我关闭终端后执行以下命令
对此有什么想法吗?
发布于 2014-11-09 02:16:32
在terminator之后的命令将在terminator退出之前不会执行,因此您必须将其发送到后台:
terminator &这将允许脚本在启动结束符(这可能太快)之后立即继续执行其他步骤,因此请尝试:
...
terminator &
sleep 3
xdotool type 'myalias'
...https://askubuntu.com/questions/547368
复制相似问题