Re: CGIs with OSX
Re: CGIs with OSX
- Subject: Re: CGIs with OSX
- From: Christopher Nebel <email@hidden>
- Date: Mon, 2 Apr 2001 11:32:47 -0700
On Monday, April 2, 2001, at 12:41 AM, T&B wrote:
AFAIK the command "osascript" works with files, not strings.
No, osascript does both :-) The man page doesn't make it clear:
"DESCRIPTION
osascript executes the given script file, or standard input if
none is
given."
but it does work. To prove it, try this via Telnet:
/usr/bin/osascript '2+3'
which compiles on the fly and gives the result of 5.
Since you can give it strings, it compiles on the fly and can include
variables for dynamic output.
Once again, this "feature" will go away in the next version. It never
should have shipped in the first place, but we had bigger fish to fry,
and quite frankly I didn't think people would discover it so quickly!
To get the same effect using sanctioned channels, use echo or cat to
pipe to osascript, like this:
% echo "2+3" | /usr/bin/osascript
5
--Chris Nebel
AppleScript Engineering