Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 2nd, 2012  |  syntax: Bash  |  size: 0.88 KB  |  hits: 17  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. for day in {0..4231}
  2. do
  3.   date=`date -d "-$day day" "+%d/%m/%Y"`
  4.   lynx -dump  "http://bet.hkjc.com/marksix/Results_Detail.aspx?lang=en&date=$date" > t
  5.   prize=`cat t | grep 1st | awk '{print $2}'`
  6.   if [ -n "$prize" ]; then
  7.     printf "%s " $date >> r
  8.     cat t | grep '\[no_.*\]' | tr '[' '\n' | cut -c4-5 | sed -n '/[0-9][0-9]/p' | tr '\n' ' ' >> r
  9.     echo $prize >> r
  10.   fi
  11.   sleep 3
  12. done
  13.  
  14.  
  15. 31/07/2012 02 10 16 23 35 47 01 $17,154,580
  16. 28/07/2012 18 25 38 40 44 45 05 -
  17. 26/07/2012 09 11 13 22 24 44 32 -
  18. 24/07/2012 10 11 15 22 23 45 31 -
  19. 21/07/2012 07 19 23 30 34 45 13 $34,938,270
  20. 19/07/2012 09 20 30 34 35 46 29 -
  21. 17/07/2012 08 11 17 24 30 49 03 -
  22. 14/07/2012 02 06 16 24 41 46 27 -
  23. 12/07/2012 02 13 33 39 40 44 43 -
  24. 10/07/2012 04 07 13 28 36 49 03 $32,054,460
  25. 07/07/2012 01 04 05 22 44 46 37 -
  26. 05/07/2012 02 03 11 24 26 27 44 -
  27. 03/07/2012 06 10 12 14 31 38 20 -