Skip to content

Instantly share code, notes, and snippets.

@masci
Created September 30, 2014 20:35
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masci/ff51d9cf40a87a80094c to your computer and use it in GitHub Desktop.
Save masci/ff51d9cf40a87a80094c to your computer and use it in GitHub Desktop.
using AppleScript to start a telnet console and wait for it to finish
#!/bin/sh
osascript <<EOF
tell application "Terminal"
activate
set _tab to do script "telnet 127.0.0.1 2001 ; exit"
delay 1
repeat while _tab exists
delay 1
end repeat
end tell
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment