Advertisement
sxiii

Ebay BigLion Coupons Test

Nov 8th, 2013
174
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.64 KB | None | 0 0
  1. # This script is intended to test ebay coupons from BigLion.
  2. # Is quantity of released coupons changed or not?
  3. # If number changes from 9518, then program will beep from speakers.
  4. #!/bin/bash
  5. while true
  6. do
  7.  
  8. curl -s -o 1.html http://www.biglion.ru/deals/ebay-80/ &
  9. sleep 5
  10. d1=$(date)
  11. d2=$(cat 1.html | grep "купонов" | awk -F"<div>" '{print $2}' | awk -F"<span>" '{print $1}')
  12. echo "There are $d2 coupons to $d1 date."
  13.  
  14. if [ $d2 != 9518 ]; then
  15. (sleep 2;killall speaker-test)&
  16. speaker-test -f 540 -p 1 -t sine >/dev/null 2>&1
  17. echo "WARNING! Coupons quantity changed!"
  18. else
  19. echo "Coupons quantity is still same :("
  20. fi
  21.  
  22. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement