Perl question / Alias question

scan300

macrumors 6502
Mar 25, 2003
256
0
Melbourne, Australia
Applescript can launch an app for you and run UNIX line commands using the "do script" command.

eg
Code:
tell application "Terminal"
activate
do script (your commands here)
end tell
 

Doctor Q

Administrator
Staff member
Sep 19, 2002
37,563
3,642
Los Angeles
If you want to use a sequence of Terminal commands, you can put them in a shell script file (e.g., file /Users/myname/myscript), give the file execute permission (with the command chmod ugo+x /Users/myname/myscript), and then have AppleScript invoke the script rather than invoking a single Terminal command.

--- Example ---

Applescript:
tell application "Terminal" to do script "/Users/myname/myscript"

File /Users/myname/myscript:
#! /bin/sh
cd /Users/myname/perlstuff
...perl conversion command...
...other commands...