OS X Run Shell Scripts From Finder
- Rename the shell script extension from .sh to .command
- Make the file executable: chmod +x file.command
- Wherever you put the file, it will run with your home directory as the current working directory. To get around this, use the following line:
cd “`dirname “$0″`”
Comments Off on OS X Run Shell Scripts From Finder