|
|
10.5: Create executable command-line AppleScripts
As robg said, you don't have to use .sh as an extension. And in fact, you shouldn't.
In the unix world, an extension on an executable is intended only to show what type of content the executable is, and .sh indicates that the executable is a script written in shell code (/bin/sh). There are many different extensions in use, but there are no hard and fast rules.. .pl is usually perl, .py is python, etc. For applescript you could use .as, or even leave the extension off all together.
Standard is ".scpt"
A moment of research shows there's already a standard for this, so please use it.
From the man page for Notice that this isn't just for Applescript.NAME osascript -- execute AppleScripts and other OSA language scripts The man page gives examples of script files with ".scpt" extensions. Please use that.
Standard is ".scpt"
Not really, .scpt is what Script Editor uses when saving as a 'script.'
10.5: Create executable command-line AppleScripts
I completely disagree with any suggestions of leaving off a file extension for OSA scripts. Let me put it this way. When viewing files on the commandline -- or even in Finder view -- it's impossible to tell what kind of script it is unless (a) it's been typed by the OS via type/creator codes, which is deprecated IIRC, and (b) file extensions. One could also look inside the file, but that's tedious on a large scale. |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.13 seconds |
|