![](/img/trans.png)
[英]OSX script to open a new iTerm window and run a command based on a variable
[英]On osx, how to open new iterm terminal tab from one script then run command in that temrinal window
我正在運行osx。 我有一個腳本,它將運行完整的堆棧,然后在末尾運行grunt。 我希望能夠在單獨的終端選項卡中分離運行的咕separate聲,我正在使用iterm。
我已經嘗試過類似的東西
open -a Terminal "cd ~/dev/work/poc/user-interface/src/main/webapp; grunt"
有任何想法嗎?
像這樣:
#!/bin/bash
osascript -e '
tell application "Terminal"
do script "date"
activate
end tell'
用您想要的date
替換date
。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.