Executing Shell Scripts from the OS X Dock?

前端 未结 9 1736
自闭症患者
自闭症患者 2020-12-22 17:15

How do I set up a shell script to execute from the Mac OSX dock? It seems that simply creating a shortcut will open the file in my editor. Is there a flag I need to set som

9条回答
  •  再見小時候
    2020-12-22 17:53

    I know this is old but in case it is helpful to others:

    If you need to run a script and want the terminal to pop up so you can see the results you can do like Abyss Knight said and change the extension to .command. If you double click on it it will open a terminal window and run.

    I however needed this to run from automator or appleScript. So to get this to open a new terminal the command I ran from "run shell script" was "open myShellScript.command" and it opened in a new terminal.

提交回复
热议问题