Skip to content

Instantly share code, notes, and snippets.

@makerneo-com
Last active August 29, 2015 13:56
Show Gist options
  • Select an option

  • Save makerneo-com/8876292 to your computer and use it in GitHub Desktop.

Select an option

Save makerneo-com/8876292 to your computer and use it in GitHub Desktop.
#!/bin/bash
for (( i = 1; i < 222222222; i+=1000 )); do
m=$(($i+1000))
php ./testModule.php $i $m &
num=$(ps -ef | grep testModule | wc -l)
while [[ $num -ge 100 ]]; do
echo $num
sleep 2
num=$(ps -ef | grep testModule | wc -l)
if [[ $num -le 100 ]]; then
break;
fi
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment