do script & do shell script

Hi folks, this New Forum is just an effort to separate pure AppleScript from any similar solutions that can be achieved via the command line. A simple example would be…

current date
--> date "Tuesday, September 30, 2003 4:36:31 AM"

The above is using AppleScript’s ‘current date’ command in its simplest form.

A similar result can be returned by utilizing this Unix command

date +%A, %B %e %Y %H:%m:%S %p
--> Tuesday, September 30 2003 04:09:08 AM

The results are indeed identical and both can be used to accomplish your tasks, but the latter is surely not AppleScript. I feel that we need a way to keep the two behemoths in their own arenas, thus this forum. Let us know what you think…

I think that this forum is a good idea. I believe that the Mac community is in need of a forum/resource that addresses all of the scripting languages that are available to OS X users. For years our choices have been very limited when it came to scripting. Now we have access to wide variety of languages. AppleScript/AppleScript Studio provide a great mechanism for gluing it all together.

I’m not suggesting that this is the forum for all of that but it’s something to consider. I once considered running for this very reason. :slight_smile:

– Rob

But by Rob’s reasoning, then there should be separate forums for JavaScript, PHP, PERL, VBA, and about 20 other scripting languages that now run on the Mac and can be addressed through AppleScript. I think a primer on shell scripting with examples exactly like Greg’s above would be more useful (any takers?). A separate forum would be confusing since most of the posts on this board are from folks who aren’t all that well versed in AS and would not know whether their query should be posted in the AS forums or this forum. This would fracture the overall usefulness of the forum and add frustration. Also, since the CLI is made up of UNIX tools that are much more heavily used, and, in many case, more mature than AS, there is much better documentation via man pages and so many more Websites devoted to them. Understanding the basics of being able to call a shell script from within AS (and process the results), how to access the man pages, and perhaps a link page to other CLI resources on the Web would be a better solution, IMO.


That’s not what I meant to imply and maybe my use of the word "forum’ was not the best choice of words in this context. has always been focused on, and limited to, AppleScript. Now we have many scripting languages at our fingertips and, in many cases, they can be tied together by AppleScript/Studio. I just think that it would be nice to have a resource, whether here or someplace else, that provides a broader range of what’s available to OS X scripters. This wouldn’t be about individual scripting languages so much as tying them all together.

I don’t know why but, even now, I seem to be having a hard time expressing myself on this issue so I’m going to shut up. :?

– Rob

I agree with Jon, I don’t feel good to keep it separate.

I’m not sure that any other script language even Perl could be compared on a Unix system to commands called with a shell.

Unix commands are the base system functions of this sort of system. Running them with a shell is the standard even if there are many different shells. No language with an extended Library, not even Java with the biggest library of all from far, cover simply all functionalites covered by the base set of unix commands.

So on OSX in an Applescript application, shell call are potentially just a call to the base system functions. Then using a shell call isn’t a call to an external script language but just a call to an extension of the new AppleScript well integrated to the new system, a Unix one.

Sometimes a command call is the more simple and efficient way to do the job you want. Sometimes you can do it fine in Applescript.

It’s a non sens to keep them separate because advise 30 lines of complicate Javascript to solve a problem when one line of a shell call solve the problem isn’t the OSX Applescript solution to advise. The AppleScript solution is through the one line shell call, it’s not an external call solution.

On another way suggesting one shell call when one or two lines or Applescript do the jod fine isn’t the solution to advise.

For this reason double competency in a same forum is the more sane OSX Applescript approach.

That’s why I vote on the deletion of this separate forum. :slight_smile:

I find that I usually only have time to glance through the posts on one forum. So, I never look at the OS 9 forum, just OS X. If this gets split, it makes the BBS harder for me to find time for, and makes it less likely I’ll scan through and post. That’s just an honest analysis of my web-surfing habits. So, I think having a separate forum will hurt both. I vote to keep everything together. OS X has the command-line, and the ability to use it gives it a lot of power. Let scripters see that. If they don’t want to use command-line solutions, they can say so, but every good solution to a problem should be in one place.

I have always liked the information I have received from the “Applescripters” at I have found all to be extremely helpful. I switch back and forth between UNIX and applescript and having a UNIX forum, with the quality of service shown at this BBS, is a plus because I know the service will be excellent. It saves me time having everything I need in one forum.

Separation of forums should not be an issue because I guarantee, knowing the psychology of human nature, if someone wants something bad enough they will take the time to find it. We never have the time to do the things we want to do…we make the time to do the things we want to do. It’s just a matter of priorities and choices.

That’s great, but you’re missing something - the true value of the BBS is not just the questions, but also good answers. I tend to post answers a lot more than I ask questions. Those of us not searching for answers may not have time to sift through multiple questions in multiple forums to see if there is someone we can help. In that case, there will be questions that end up ignored, or answered incompletely. A good search function doesn’t care which forum an answer is in, so a person who needs an answer isn’t helped by splitting forums very much, while those who may have answers, but not much time will be slowed down.

Don’t make it harder for people to be helpful.

by the reasoning that the shell is “not” AppleScript, we should also forbid anyone to suggest using OSAXen, including the Standard Additions, or any scriptable app, including those that come with Mac OS X.

The shell comes with the standard Mac OS X install, and since do shell script makes it accessible, is just as valid to accomplish a task as anything else in AppleScript. When a user asks “how do I do XXX?” and the best way is a shell utility, are we forbidden to suggest it? Trying to split it just makes no sense. I’m going to continue to try to answer questions with the best (and possibly multiple) possibilities, regardless of what forum the user posted in. Of course, if they post in the OS 9 forum, I would mention that a do shell script solution won’t work in 9.

I would really like to see this forum focus on the interactions between the AppleScript language and other Unix languages. I think that there are many excellent websites that cover other scripting languages such as javascript, php, perl, and even the dreaded “VB”. But this is the only truly excellent site left on the web for AppleScript. I don’t really want to see this become a forum for learning other scripting languages, but rather how do we make our beloved applescript communicate with other lanaguages and pass information back and forth between the two. Anyway, that’s my two cents