Skip to content

Instantly share code, notes, and snippets.

@kevincon
Created December 5, 2012 05:12
Show Gist options
  • Save kevincon/4212506 to your computer and use it in GitHub Desktop.
Save kevincon/4212506 to your computer and use it in GitHub Desktop.
CS144 Lab 5 Worktime script
#!/bin/sh
#Change this to be your SUID
SUID=YOUR_SUID
#Change this to be the path to your ec2_script/ folder on myth
EC2_SCRIPT=~/ec2_script
#kinit only works if you've followed instructions at
#http://cs.stanford.edu/people/mbostock/kerberos.html
kinit $SUID@stanford.edu
sleep 3
ssh -t $SUID@myth.stanford.edu "cd $EC2_SCRIPT; ./start.sh lab5"
sleep 3
xterm -e "ssh -t $SUID@myth.stanford.edu" &
xterm -e "ssh -t $SUID@myth.stanford.edu 'cd $EC2_SCRIPT; ./ec2_ssh.sh'" &
sleep 15
xterm -e "ssh -t $SUID@myth.stanford.edu 'cd $EC2_SCRIPT; ./ec2_ssh.sh'" &
sleep 15
ssh -t $SUID@myth.stanford.edu 'cd $EC2_SCRIPT; ./ec2_ssh.sh'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment