Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Running .sh files...

Hey, ive used to use Ubuntu and on Ubuntu you can just set the chosen file to be executable, but i cannot seen to find any way of doing that on OS 10.6. I just need a .sh file to run, thanks!

Macbook Pro 13", Mac OS X (10.6.6), 4GB Ram

Posted on Jan 30, 2011 5:59 PM

Reply
4 replies

Feb 4, 2011 3:12 PM in response to Tehsimpl

Since Mac OS X at the shell prompt behaves the same as most other Unix implementation with respect to running a script (including Ubuntu), I'm not sure I understand why you thing they are different.

others have pointed out that the script must be executable, and if you are not in the same directory as the script, you either need to 'cd' to that directory, or use a /full/path/to/the/script.sh

You can also add the script's directory to your PATH environment variable via .bash_profile, or put the script in one of the directories already covered by your PATH environment variable.

Or are you talking about starting the script from the Ubuntu desktop by double-clicking on it? If that is the case, then double-clicking on a shell script from the Mac OS X Finder needs the shell script to both be executable, and have a suffix of .command

If any of the replies so far have not answered your question, please feel free to provide additional information.

Running .sh files...

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.