Skip to content

Instantly share code, notes, and snippets.

@gianpaj
Created May 14, 2014 23:30
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gianpaj/7c582b4b3c23bf494e64 to your computer and use it in GitHub Desktop.
Save gianpaj/7c582b4b3c23bf494e64 to your computer and use it in GitHub Desktop.
Automate opening of new tabs in iTerm/Terminal and start command or daemon
#!/bin/bash
echo
echo "Opening project services in a new iTerm window"
osascript <<EOD
launch "iTerm"
tell application "iTerm"
activate
set myterm to (make new terminal)
tell myterm
launch session "mongodb"
tell the last session to write text "mongod"
launch session "redis"
tell the last session to write text "redis-server"
end tell
end tell
EOD
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment