Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'easier way' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
easier way
Authored by: ngb on May 06, '04 12:16:49PM
At the prompt type:

% osascript
When you hit enter, you get a blank line with no prompt. Start typing your script (or paste it in). When you're done, hit ^D (Control-D) and the script will execute. The advantage of this approach is that indented lines are correctly interpreted, and no special escape characters are needed for double-quotes within the script.

[ Reply to This | # ]
easier way, forgot to mention...
Authored by: ngb on May 06, '04 12:34:23PM

Forgot to mention, hitting return at the end of a line lets you continue your script on a new line. After the last line of your script, you need to hit Control-D on a new blank line.



[ Reply to This | # ]
easier way
Authored by: orpy on May 06, '04 02:24:43PM

Yes thanks for mentioning that - I was going to post a follow-up myself, but you've beaten me to it :-(

I still think that the "<<" is worth mentioning as it can be used with other commands that require multiple lines of input (like ftp etc) or for creating quick script files on remote machines without using a specific editor.

Regards

---
--
Martin



[ Reply to This | # ]