File: parallel_draw.sh

package info (click to toggle)
hinge 0.5.0-8
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 2,972 kB
  • sloc: cpp: 9,480; ansic: 8,826; python: 5,023; sh: 340; makefile: 10
file content (19 lines) | stat: -rwxr-xr-x 581 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#!/bin/bash
echo "Bash version ${BASH_VERSION}..."
for i in $(seq 4000 1 20000)
  do
     echo drawing read $i
     num1=$(ps -ef | grep 'python3 draw.py' | wc -l)
     num2=$(ps -ef | grep 'LA4Awesome' | wc -l)
     num=$(( $num1 + $num2 ))
     echo $num running
     while [ $num -gt 60 ]
         do 
             sleep 5
             echo waiting, $num running
             num1=$(ps -ef | grep 'python3 draw.py' | wc -l)
             num2=$(ps -ef | grep 'LA4Awesome' | wc -l)
             num=$(( $num1 + $num2 ))             
         done
     python3 draw2.py $i &
 done