Guest User

Untitled

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