How do I make this file.sh executable via double click?

后端 未结 5 1575
长发绾君心
长发绾君心 2020-11-28 17:42

First off I\'m using Mac.

Next, I need to execute this \"file.sh\" we will call it. Everytime I need to execute it I have to open Terminal and type:

         


        
5条回答
  •  粉色の甜心
    2020-11-28 18:29

    You can just tell Finder to open the .sh file in Terminal:

    1. Select the file
    2. Get Info (cmd-i) on it
    3. In the "Open with" section, choose "Other…" in the popup menu
    4. Choose Terminal as the application

    This will have the exact same effect as renaming it to .command except… you don't have to rename it :)

提交回复
热议问题