Guest User

Untitled

a guest
Oct 20th, 2011
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.28 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. maxjobs=10
  4. running=0
  5.  
  6.  
  7. while read host source target ; do
  8.         (echo "varunk"; sleep 10) &
  9.  
  10.         running=$(($running+1))
  11.  
  12.         if [ "$running" -ge $maxjobs ]; then
  13.                 wait
  14.                 running=0
  15.         fi
  16. done < replication.txt
  17. wait
  18.  
Advertisement
Add Comment
Please, Sign In to add comment