• 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: Script Menu In OS X
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Script Menu In OS X


  • Subject: Re: Script Menu In OS X
  • From: Chris Nebel <email@hidden>
  • Date: Tue, 30 Oct 2001 02:47:43 -0500
  • Organization: Apple Computer, Inc.

garbanzito wrote:

> however take a look at how the shell script example is
> done for a possible hint how to make Perl work ... i didn't
> run it, but i noticed it's a TextEdit file, not
> "*.command", nor is it set to "Open with application
> Terminal". instead, Script Menu must see that the file
> starts with "#!/bin/csh" and know to treat it as a shell
> script. don't Perl scripts have a similar opening line?

Indeed they do -- "#!/usr/bin/perl", to be precise. Script Menu will
treat any file that begins with "#!" as a script and try to execute it.
It's a little weird about it, though -- if it doesn't see
"#!/usr/bin/perl", it executes it using /bin/sh, which means you can't
throw an arbitrary script at it. E.g., you couldn't use a csh script by
leading off with "#!/bin/csh". This might be construed as a feature,
but I'd consider it an iffy one at best.


--Chris Nebel
AppleScript Engineering


  • Follow-Ups:
    • Re: Script Menu In OS X
      • From: John W Baxter <email@hidden>
References: 
 >Script Menu In OS X (From: Jason Bourque <email@hidden>)
 >Re: Script Menu In OS X (From: garbanzito <email@hidden>)

  • Prev by Date: Mail OS X, can't move message or get date?
  • Next by Date: Scripting Canto Cumulus 5.010
  • Previous by thread: Re: Script Menu In OS X
  • Next by thread: Re: Script Menu In OS X
  • Index(es):
    • Date
    • Thread