Advertisement
Guest User

Cubs Score Notification 2

a guest
Sep 20th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. inning=$(lynx -nonumbers -dump https://www.thescore.com/mlb/events | grep -iA5 cubs$
  4.  
  5. if [[ -z "$innings" ]];
  6.  
  7. then
  8.  
  9. echo "No games found." > ~/bin/cubsscore.temp
  10.  
  11. else
  12.  
  13. echo $inning > ~/bin/cubsscore.temp
  14. echo : >> ~/bin/cubsscore.temp
  15. lynx -nonumbers -dump https://www.thescore.com/mlb/events | grep -iA5 cubs | grep -$
  16. echo - >> ~/bin/cubsscore.temp
  17. lynx -nonumbers -dump https://www.thescore.com/mlb/events | grep -iA5 cubs | grep -$
  18.  
  19. fi
  20.  
  21. notify-send "$(cat ~/bin/cubsscore.temp | xargs)"
  22.  
  23. rm ~/bin/cubsscore.temp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement