- First in terminal make the script executable by typing:
chmod a+x (yourscriptname)
- Then, in Finder, right-click your file and select “Open with” and then “Other…”.
- Here you select the application you want the file to execute into, in this case it would be Terminal.
- To be able to select terminal you need to switch from “Recommended Applications” to “All Applications”.
NOTE: The Terminal.app application can be found in the Utilities folder
- If you want this to be the default behaviour from now on, check the “Always Open With” box.
- After clicking OK you should be able to execute you script by simply double-clicking it.