Execute a BASH script... by double-clicking on it?
Maybe change the extension name to .command, but I think there should be some workaround to make .sh work.
To run by double click on the icon: open terminal and cd to directory of script. then chmod +x . finder will decide if it is excutable or not.
-
Go to your Terminal or iTerm.
-
Change to directory where your file is located.
-
Type the following:
chmod a+x (yourscriptname)
-
Right click on your file and select Open with and Other.
-
Enable All Applications and choose Terminal.
-
NOTE: If you always want to open that file with Terminal, then check Always Open With.
-
Finally, double click on your file and it should work.