I am writing what I assume is pretty easy bash script file. Although I cannot seem to do the following combination:
open new terminal instance > cd to directory > run command in that terminal instance
I got as far as:
open -b com.apple.terminal /path/I/want/
but if I try something like:
open -b com.apple.terminal /path/I/want/ && /path/to/command someCommand
It runs in the original window instance and not the new one. Tried some other variations of that as well with no success
I managed to solve this with the following:
osascript -e "tell application \"Terminal\" to do script \"cd /directory/to/open && /path/to/command command\""
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With