crawl.sh 227 B

123456789101112131415
  1. #!/bin/bash
  2. # Crawl at a thread rate
  3. threads=4
  4. urls="urls.txt"
  5. output="db.txt"
  6. x=1
  7. while IFS= read -r line
  8. do
  9. echo "Off crawler number ${x}!"
  10. php crawl.php $line $output.$x > webcrawl.log &
  11. ((x=x+1))
  12. done < $urls