File: parallel_draw_large.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 (16 lines) | stat: -rwxr-xr-x 392 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#!/bin/bash
echo "Bash version ${BASH_VERSION}..."
for i in $(seq 1 1 100)
  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 12 ]
         do 
             sleep 5
             echo waiting
         done
     python3 draw.py $i &
 done