Advertisement
vojtarek

test.sh all

Sep 14th, 2011
409
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.75 KB | None | 0 0
  1. #!/usr/bin/env bash
  2. out=`ssh merlin "ssh athena \"ps U xrylko00\""`
  3.  
  4. IFS=$'\n' ### changes break point for arrays!!! no break on spaces
  5.  
  6. # master
  7. masters=("master.py 1"
  8. "master.py 3"
  9. "master.py 4")
  10. for master in ${masters[*]}
  11. do
  12.     if [[ $out != *$master* ]]
  13.     then
  14.         echo "Starting master.sh ${master:9:2}"
  15.         ssh merlin ssh athena "screen -dmS \"master\" /mnt/minerva1/nlp/projects/spinn3r/master/master.sh ${master:9:2}"
  16.     fi
  17. done
  18.  
  19. # termvector
  20. if [[ $out != *termvector.sh* ]]
  21. then
  22.     echo "Starting termvector.sh"
  23.     ssh merlin ssh athena 'screen -dmS "termvector" /mnt/minerva1/nlp/projects/spinn3r/db/termvector.sh'
  24. fi
  25.  
  26. # affected
  27. if [[ $out != *affected.sh* ]]
  28. then
  29.     echo Starting affected.sh
  30.     ssh merlin ssh athena 'screen -dmS "affected" /mnt/minerva1/nlp/projects/spinn3r/db/affected.sh'
  31. fi
  32.  
  33. # stahovak
  34. if [[ $out != *stahovak.sh* ]]
  35. then
  36.     echo Starting stahovak.sh
  37.     ssh merlin ssh athena 'screen -dmS "stahovak" /mnt/minerva1/nlp/projects/spinn3r/stahovak/stahovak.sh'
  38. fi
  39.  
  40. # alchemized
  41. if [[ $out != *alchemized.sh* ]]
  42. then
  43.     echo Starting alchemized.sh
  44.     ssh merlin ssh athena 'screen -dmS "alchemized" /mnt/minerva1/nlp/projects/spinn3r/stahovak/alchemized.sh'
  45. fi
  46.  
  47.  
  48. # stanfordtoinstances.py
  49. if [[ $out != *stanfordtoinstances.sh* ]]
  50. then
  51.     echo Starting stanfordtoinstances.sh
  52.     ssh merlin ssh athena 'screen -dmS "stanfordtoinstances" /mnt/minerva1/nlp/projects/spinn3r/db/stanfordtoinstances.sh'
  53. fi
  54.  
  55.  
  56. # calaised
  57. calaiss=(
  58. "calaised.py 0"
  59. "calaised.py 100"
  60. )
  61. for calais in ${calaiss[*]}
  62. do
  63.     if [[ $out != *$calais* ]]
  64.     then
  65.         echo "Starting \"calaised.sh ${calais:12:5}\""
  66.         ssh merlin ssh athena "screen -dmS \"calaised\" /mnt/minerva1/nlp/projects/spinn3r/stahovak/calaised.sh ${calais:12:5}"
  67.     fi
  68. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement