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

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:

cd /Users/Jacob/Documents/folderWithFileInIt
bash file.sh

This is okay, but I feel like it would be a lot quicker if I make the file execute on double click, don’t you think?

So my question is, how do I make this file executable via double click?

My ideas were either:

a) type something like chmod into terminal and change permissions?

b) make a file, put code I wrote above in it ^ and then make that file executable?

c) make an automation somehow to do this?

Which way is best, or is there an even better way? Also please explain as much as you can, I’m new to Terminal. Thanks.

6 Answers
6

Leave a Comment