Re: where are the shell scripts ?
Re: where are the shell scripts ?
- Subject: Re: where are the shell scripts ?
- From: Doug McNutt <email@hidden>
- Date: Wed, 9 Feb 2005 09:18:00 -0700
The AppleScript command is "do shell script" for good reason. It might have been "do shell command" but that would have implied that it's limited to the fairly short list of built-in commands in the bash shell or perhaps even to those in the original UNIX shell "sh".
In fact a shell script is nothing more than a text file containing shell commands using your choice of shell. Those commands can access a large array of UNIX executable files that are very much the same as applications except that they do not use the Macintosh GUI - graphical user interface - or support AppleEvents which are the lifeblood of AppleScript.
You can write your own scripts with a text editor and then use AppleScript to provide the GUI. It becomes a "do shell script" '~/myPersonalTexFile' and it's a whole lot easier than writing an X-code or Carbon application. You really can write a few lines of C code, compile them with the cc compiler, and run them using a "do shell script" that points to the executable file created by cc. Sometimes I think such a task ought to be required as a learning exercise for all users much as long division with pencil and paper is a prerequisite for using a calculator. With OS neXt you can do it. With the Classic Mac OS such a task required joining the priesthood.
perl, python, PHP, are examples of scripting languages which use "just in time" compiling. They offer execution speed, flexibility, and a well-defined syntax that takes time to learn but is more consistent than AppleScript. I like the chess to poker analogy, one is decisively defined and the other depends on analysis of other minds. curl, wget, and others offer an alternate interface for moving files around the internet. All it takes is a willingness to learn. Google for any one of the funny names for more.
--
Applescript syntax is like English spelling:
Roughly, but not thoroughly, thought through.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden