Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

akaash1087

macrumors newbie
Original poster
I am new to MAC OS X.I have made a shell script and have placed it on the desktop and I want that it should run it when I double click on the icon.Should I save the file with .scpt extension?When I double click it,A window opens up which shows options "Run" , "compile" and a few others.When I click on "Run" ,it gives an error "expected end of line etc, but found identifier"

similar posts have been there but couldnt quite understand the answers
Any help would be appreciated.....
 
You need to use the .command extension if you want to be able to double click on shell scripts and have them execute, .scpt is for AppleScripts.

You'll also need to make sure the shell script has the execute bit set in its permissions for at least yourself.
 
I have already tried that

I have already tried that,on double clicking it opens the script in texteditor.Thats probably because I ve selected text editor as default app,But then which app do I chose?

I have given myself execute permission,but still it doesnt execute
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.