Advertisement
Nickpips

Untitled

Oct 4th, 2015 (edited)
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. $(echo "" | cat > output)
  4.  
  5. for f in `seq 3 761`; do
  6. $(wget https://hsf.csaw.io/team/$f -q -O - > web)
  7. out=$(cat web | grep -oP '\<td\>\K([0-9]+)' > tmp)
  8. arr[$f]=0
  9. while read -r a; do
  10. ((arr[$f]+=a))
  11. done < tmp
  12. echo ${arr[$f]} >> output
  13. done
  14.  
  15. $(sort -n output | tac > scoreboard)
  16. $(rm web | rm tmp | rm output)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement