: :

Add Comment | Related Links | TrackBack
Related Content

Executing Shell Script in Mac OS X Finder

It's easy to set-up the finder so that you can execute shell scripts simply by double-clicking on your shell script. To set it up, take the following steps:

  1. Right-click on the shell script.
  2. Click on "Open With"
  3. Click on "Other..."
  4. Change "Enable: Recommended Applications" to "Enable: All Applications"
  5. Navigate to "/Applications/Utilities"
  6. Select "Terminal"
  7. Enable "Always Open With"
  8. Click "Open"

Now you are set-up to execute the shell script every time you double-click on it.

Chieh Cheng
Tue, 17 Mar 2009 23:59:39 +0000

Lovely, thanks a lot. Glad there's a quick solution to this somewhat annoying problem.

Michal Huniewicz
Sat, 30 May 2009 22:19:30 +0000

The instruction above is for shell scripts with the ".sh" extension. If you use bash shell and your shell script has the ".bash" extension, they will automatically execute on double-click.

In addition, the instruction above is to change the execution of a single ".sh" shell script.

The following instruction allows you to change all ".sh" files to execute:

1. Right click on a ".sh" file.
2. Select "Get Info".
3. Under "Open with:", pull down the drop-down box and select "Other...".
4. Navigate to the "Utilities" folder.
5. Pull down the "Enable:" drop-down box and select "All Applications".
6. Select "Terminal".
7. Enable "Always Open With".
8. Click the "Add" button.
9. Click on the "Change All..." button.
10. Click the "Continue" button.
11. Close the "Get Info" box.

Chieh Cheng
Fri, 20 Aug 2010 22:56:51 +0000

Doesn't work on osx! pwd is only correct if called in a term alike ./scriptname
I only want to copy to files for the current folder to ../ccs/ccld/
any help?

Mon, 18 Jul 2011 10:01:40 +0000

Not sure what you are talking about, mike. Please describe your problem in detail and in context.

Chieh Cheng
Mon, 18 Jul 2011 17:06:24 +0000

probably works only if script already has execute rights (chmod 777)

Thu, 29 Sep 2011 12:11:49 +0000

Add Comment | Related Links | TrackBack
Related Content

Did your message disappear? Read the Forums FAQ.

Add Comment

Spam Control | * indicates required field
Your Name: *
Remember Me!
Comment: *
File attachment is optional. Please do not attach a file to your submission unless it is relevent.
Attach File:
(20 MB Max)
Spam Protection: * Answer of 4 + 2?
Click button only once, please!


TrackBack only accepted from WebSite-X Suite web sites. Do not submit TrackBacks from other sites.

Send Ping | TrackBack URL | Spam Control

No TrackBacks yet. TrackBack can be used to link this thread to your weblog, or link your weblog to this thread. In addition, TrackBack can be used as a form of remote commenting. Rather than posting the comment directly on this thread, you can posts it on your own weblog. Then have your weblog sends a TrackBack ping to the TrackBack URL, so that your post would show up here.

Messages, files, and images copyright by respective owners.

Articles | Wiki
Forums | Latest | RSS
Library | Links | News
Search | Store | Help

101 Users Online

Hacking Digital Cameras
Fun for Photographers

Amazon Associate

Copyright © 2004 - 2024. All Rights Reserved.