Running a command in a new Mac OS X Terminal window

one way I can think to do it off the top of my head is to create a .command file and run it like so:

echo echo hello > sayhi.command; chmod +x sayhi.command; open sayhi.command

or use applescript:

osascript -e 'tell application "Terminal" to do script "echo hello"'

although you’ll either have to escape a lot of double quotes or not be able to use single quotes

Leave a Comment