cannot run a unix executable

General discussions about LaunchBar
norbert
Objective Development
Objective Development
Posts: 648
Joined: Thu Nov 09, 2006 6:30 pm

Post by norbert » Mon Feb 09, 2009 10:36 pm

Dennis wrote:To be clear then, kastorff's suggestion is the correct approach, right? That is, set the "Open With" app to Terminal and make sure the file is executable.

For my test on a Ruby script, I had to remove the .rb extension as well to get the Finder to recognize it as Kind: Unix Executable.

I don't think that changing the "Open With" app has an effect on a file's type.

To make a file considered as a Unix Executable File you have to remove its filename extension, remove type and creator codes, and set its execute permissions.

If you've installed the developer tools, type and creator can can be removed with:

Code: Select all

/Developer/Tools/SetFile -c "" -t "" myShellScript

kastorff
Rank 1
Rank 1
Posts: 37
Joined: Fri Dec 14, 2007 5:58 pm

Post by kastorff » Tue Feb 10, 2009 3:33 am

Thanks, norbert, for the clarifications. Seems I found a possible solution without truly understanding the details... ;)

ludwigschubert
Rank 4
Rank 4
Posts: 285
Joined: Fri Jun 29, 2007 5:54 pm
Location: Germany, Bavaria

Post by ludwigschubert » Tue Feb 10, 2009 7:45 pm

norbert,
maybe a LaunchBar action should be included "Make Shell Script executable" :wink:

Dennis
Rank 3
Rank 3
Posts: 146
Joined: Mon Dec 10, 2007 7:47 pm
Location: California

Post by Dennis » Tue Feb 10, 2009 7:48 pm

ludwigschubert wrote:norbert,
maybe a LaunchBar action should be included "Make Shell Script executable" :wink:


And maybe include Automator Workflows too.

-Dennis

iota
Posts: 5
Joined: Tue May 04, 2010 11:39 pm

Re: cannot run a unix executable

Post by iota » Mon Nov 24, 2014 10:04 pm

In my case removing the file ".sh" extension caused Finder to recognize the shell script as a UNIX executable and thus be ready to use for sending files to it through LaunchBar.

A similar solution was reported here: viewtopic.php?f=4&t=1062&hilit=LaunchBar+must+be+able+to+distinguish+a+Shell+Script

This ironic because now the shell scripts no longer show up in the "Shell Scripts" category without the ".sh" extension!

Post Reply