Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Execute shell scripts in the Finder UNIX
[Submitted by smhaunch]

I'm not sure if this has been reported before, but there is a simple (and quite slick) way of running shell scripts from the finder.

Simply append '.command' to the script name,e.g. test.command, when the script is double clicked from the Finder a terminal window will open and the script is excuted.

The script will of course need execute permissions (chmod ug+x will do the trick) in order to run.

Tip courtesy of Peter Fraterdeus at the O'Reilly Mac DevCenter.
    •    
  • Currently 3.91 / 5
  You rated: 2 / 5 (11 votes cast)
 
[62,195 views]  

Execute shell scripts in the Finder | 1 comments | Create New Account
Click here to return to the 'Execute shell scripts in the Finder' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Execute shell scripts in the Finder
Authored by: walkerm930 on Feb 26, '10 12:31:21PM

I just set all files that end in ".sh" to open with Terminal. It works fine and you don't have to change the name of each shell script you want to run.



[ Reply to This | # ]