I'm trying to write a short shell script to open a new terminal window and launch a program. Here is what I have:
osascript <<END
tell application "Terminal"
make new window
activate
set contents of window to "./hello" & return
end tell
END
execution error: Terminal got an error: AppleEvent handler failed. (-10000)
Can anyone tell me how to do this? In a perfect world, I'd also like this script to run on Linux, so if there is a method that will be portable, that would be preferable.
Thank you!