Skip to content

Instantly share code, notes, and snippets.

@zacharysyoung
Created August 10, 2019 18:22
Show Gist options
  • Save zacharysyoung/39dda9f15764eb583369acd013eab9e5 to your computer and use it in GitHub Desktop.
Save zacharysyoung/39dda9f15764eb583369acd013eab9e5 to your computer and use it in GitHub Desktop.
#!/bin/bash
bin/godoc -http "localhost:6060" -index -index_files bin/idx -v > godoc.log 2>&1 &
open "http://localhost:6060/"
bin/tour > tour.log 2>&1 &
docPid=$(ps | grep godoc | grep -v grep | awk '{print $1}')
tourPid=$(ps | grep tour | grep -v grep | awk '{print $1}')
echo "#!/bin/bash" > kill-learn.sh
echo "kill $docPid $tourPid" >> kill-learn.sh
echo "rm kill-learn.sh" >> kill-learn.sh
chmod +x kill-learn.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment