Skip to content

Instantly share code, notes, and snippets.

@jtatum
Last active December 14, 2015 06:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jtatum/5041562 to your computer and use it in GitHub Desktop.
Save jtatum/5041562 to your computer and use it in GitHub Desktop.
Shell script to start automation in a local terminal window
#!/bin/bash
# Note - you can't run this script in the local terminal.
# Run it via SSH or cron or something else.
COMMANDS="your automation script here"
killall python 2>/dev/null
killall Terminal 2>/dev/null
open -a Terminal
osascript <<EOF
tell application "Terminal"
close every window
do script with command "$COMMANDS"
end tell
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment