Re: To shell or not to shell (was Re: URL Access Redux)
Re: To shell or not to shell (was Re: URL Access Redux)
- Subject: Re: To shell or not to shell (was Re: URL Access Redux)
- From: "John C. Welch" <email@hidden>
- Date: Mon, 22 May 2006 22:21:10 -0500
- Thread-topic: To shell or not to shell (was Re: URL Access Redux)
On 5/22/06 19:55, "Stockly, Ed" <email@hidden> wrote:
> The same thing is happening now. It's as if this list has been hijacked by
> shell scripting and the humble AppleScripter is barely being supported
> anymore. And the new AppleScripter, who's drawn to the technology by the
> English like syntax and the beauty of the AppleScript language and the robust
> interapplication technology, is bombarded by this shell scripting gibberish
> (at least that's what a typical shell script looks like to a typical Mac user)
> and nearly always pointed away from AppleScript and towards shell scripting.
>
> I don't complain every time a shell script is mentioned, but I do complain
> when someone asking for AppleScript help is "force fed" shell scripting, when
> there are perfectly good pure AppleScript alternatives.
>
> And, no, Shell scripts are not AppleScript. Shell script's have an
> incomprehensible syntax, a single command can take hours to fully master, and
> there are a number of different languages and syntaxes used in shell scripting
> so a command that works in one context (say the terminal) won't work in
> another (like a do shell script command, for example); there's no consistent
> error trapping to speak of and any user interaction must come from the
> AppleScript side. To call them AppleScript's simply because they can be called
> from an AppleScript is absurd.
Okay, so I'm probably crossing a line, but this is just inane tripe and
fearmongering. Of course you're seeing more shell here, OS X is BASED ON
UNIX. To say that you should avoid using shell because this is an
AppleScript list is like saying you should avoid OSAX because they aren't
standard. Bulldookey.
Sure shell syntax is weird. SO'S APPLESCRIPT. So's
every.other.programming.language. It's all weird, because once you get above
pure machine code, it's all a really deep perversion of English. So the idea
that one is magically better than the other is, to use a phrase, "wooly
thinking". If you grok the syntax, great. If not, use another tool. As well,
if you're going to gripe about commands changing based on context, and then
you're defending the purity of *AppleScript*??? Ow, my head go 'splodey.
You're kvetching about hard to master commands? Oh please, tell how you
mastered the full use of script objects and libraries in five minutes
without any kind of reference, and I'll show you my new pet monkey. It
flies, and it just came out of my butt.
The idea that AppleScript is some bastion of self-documenting code is a myth
that should be put down like a rabid dog. I guarantee you, it's just as
arcane as shell. You just like it more.
Please, there are things that shell just does better. If I'd had your
attitude, I'd STILL be waiting for a way to script Antivirus scans and link
the shell component of Virex to folder actions attached to the desktop. But
instead, a flexible attitude gave me that ability *five years ago*.
You may like the "purity" of UI scripting to change network settings, but
I'll take do shell script and network setup, and while you're locked into
only running a script on logged in systems, I just scripted Apple Remote
Desktop with some shell action, and set up 200 machines faster than you can
set up one.
How are you liking that scriptable print setup? Sure, I'm still pushing for
a more pure AppleScript solution, but in the meantime, instead of doing it
the hard way, lpadmin's my friend.
How's your remote scripting working across a WAN in a secure fashion without
a whole VPN setup? Kerberized SSH means single signon and long range
applescripts, no extra passwords needed. A little do shell script, and
presto, I'm automating Macs from a thousand miles away, easily and securely.
You don't have to like shell Ed, but get off the purity horse, it's a
cripple from the start. Shell is just a tool. So is AppleScript. If someone
asks a question, and I can answer it better with a combination of shell and
AppleScript, then I'd be deceptive to try and force them to use "pure"
AppleScript just because it's more racially pure.
Besides, you're missing one very, critical point of AppleScript:
It was never designed to be a standalone language. AppleScript is a glue
language, and it works best that way. Shell, BBEdit, OSAX, FBAs,
PhotoShop...it's a glue Ed. Glue on it's own is just a sticky mess. The idea
that AppleScript should only be used to glue some things, but not shell, or
that this list should avoid shell because it's not "Pure AppleScript" is
antithetical to the very IDEA of AppleScript.
Shell's here to stay Ed, get over it and move on.
--
"The only easy day was yesterday."
US Navy SEALs
_______________________________________________
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