Make .csh executable?

TuffNut2Crack

Registered
Is there a way to make a .csh script executable via the finder? I've written this simple script:
#!/bin/csh
open /applications

And I want it to run through the finder. I'm able to get it to work through the command line, but OS X recognizes it as a Photoshop shape file or something like that. Setting Finder as the default application doesn't seem to work either. Anyone know how to do this, or if it's even possible?
 
run the command:

chmod a+x myscript.csh

I'd suggest renaming it to a TERM file, this can be run with a double-click from the finder.
 
Yeah, that's right ...

Hmm ... maybe if you just keave out the shebang line (#!/usr/bin/csh) ?
 
PS It looks like you're trying to open the /Applications folder when someone logs on.

Keep in mind that ~/.cshrc is called only when a shell starts, not when someone logs in on the console; so someone will get the Applications folder opened whenever the shell starts for that user regardless of who is logged in at the console...

If you're trying to open the /Applications folder when someone logs in to the console, just add an AppleScript to the Login Items menu.
 
This AppleScript will do the trick, save as a compiled script:

Code:
try
	do shell script "open /Applications"
end try
 
Back
Top