3 ms·
If you're on a Mac, you can do this with AppleScript. If you open the Script Editor, you can use this chunk of code to get started: tell application "Term
by mbreese 5y ago
If you're on a Mac, you can do this with AppleScript.
If you open the Script Editor, you can use this chunk of code to get started:
tell application "Terminal"
do script "~/test.sh"
end tell
This will run the script ~/test.sh in a new terminal window. Closing the window automatically is a bit more difficult, but it can also be done. You can save this as an Application, which will let you click to open it, just like any other application.
See here for more information:
https://stackoverflow.com/questions/1870270/sending-commands-and-strings-to-terminal-app-with-applescript https://stackoverflow.com/questions/1870270/sending-commands...
https://stackoverflow.com/questions/27453987/how-to-close-a-terminal-tab-using-applescript https://stackoverflow.com/questions/27453987/how-to-close-a-...