• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Scripting Additions: Embracing the Horror of Unix
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Scripting Additions: Embracing the Horror of Unix


  • Subject: Re: Scripting Additions: Embracing the Horror of Unix
  • From: garbanzito <email@hidden>
  • Date: Thu, 31 Jan 2002 14:17:46 -0700

at 2002 01 31, 21:26 +1100, they whom i call Shane Stanley wrote:
Actually, my hinting was to those who seem to know unix well, and claim it
as out savior. Maybe no-one's posted the handlers because they think it's
just too obvious or something. But it does seem a bit odd to me. Four
presumably simple handlers. But then...

personally, i have a 20+ year acquaintance with unix, but
we're not best buddies, nor have i claimed it as a savior.
nonetheless, i did look at the problem of the Jon's Commands
file handlers...

first of all, i hadn't ever used Jon's file handlers, and i
don't script the Finder much, so it would have taken me time
to parse all the possibilities. second, it seemed Finder can
do most of it (as you concluded below). third, i came to the
conclusion that (pursuant to my general comments about the
different philosophies) it would be rather awkward to try to
create single shell-based handlers with all the capabilities
of one of the OSAX commands. personally, i would tackle
it a task at a time rather than replicate Jon's Commands.

i think it would be better (for those who don't reject unix
out of hand) to talk a little about what one should learn in
order to most effectively "embrace the horror". i don't
think these are strictly AppleScript issues; more a good
study topic for anyone who wants to know what's going on in
their Mac OS X system.

there is probably a good reference on this somewhere, but
here's my outline:

- some understanding of file system issues: what is a "posix
path"; how case matters; how to escape special characters;
issues around resource forks and HFS+ metadata; the layout
of typical unix system directories; differences between
aliases, hard links and soft links; unix line end characters

- the basic unix command line syntax: how arguments are
passed on the command line; the idea of standard input and
standard output

- some of the basic commands (mv, rm, cp, sh, ditto, sudo,
chmod, etc.)

- the more useful Apple commands in /Developer/Tools (CpMac,
MvMac, GetFileInfo, SetFile)

- how to use man

- a good understanding of permissions, ownership and groups

- study of how "do shell script" invokes commands and how to
really invoke a shell when needed (because "do shell script'
doesn't invoke a shell, so built-in shell commands aren't
available, and some environment assumptions are different)

- the nature of shells, pipes, environment variables, init
files, daemons, shell scripting languages, perl, etc. ...
not deep study, just enough to know the difference between
and built-in shell command, a command that is actually unix
program, and a script

the amount of detail may seem overwhelming. i can't say for
whom it will or won't be worth it, but i know a unix
scripter would face a similar challenge trying to learn
AppleScript & Mac OS.

--
steve harley email@hidden


References: 
 >Re: Scripting Additions: Embracing the Horror of Unix (From: Shane Stanley <email@hidden>)

  • Prev by Date: Re: Scripting Additions: Embracing the Horror of Unix
  • Next by Date: Re: URL Access Scripting Problem
  • Previous by thread: Re: Scripting Additions: Embracing the Horror of Unix
  • Next by thread: Re: OS X test for Class Folder...continues
  • Index(es):
    • Date
    • Thread