Re: Script Menu In OS X
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