/ Published in: Bash
this works even if you call this script in the background... awesome
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
#!/bin/bash for i in {1..10}; do while [ `jobs | wc -l` -ge 4 ] ; do sleep 1 done (echo $i ; sleep 3 ) & done