Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 #!/bin/bash
- 2
- 3 num_episodes=77
- 4 cheekys_episodes=`curl -s 'https://cheekyvideos.net/' | grep -o 'Murdoch Murdoch Video Archive \[[[:digit:]]*\]' | grep -o '[[:digit:]]*'`
- 5 new_eps=$(($cheekys_episodes - $num_episodes))
- 6
- 7 # full text
- 8 case $new_eps in
- 9 -*) echo "Error: set num_episodes in the source file" ;;
- 10 0) echo "No new episodes" ;;
- 11 1) echo "1 new episode!" ;;
- 12 *) echo "$new_eps new episodes!" ;;
- 13 esac
- 14
- 15 #short text
- 16 echo "$new_eps new eps"
- 17
- 18 # color
- 19 if [ $new_eps -gt 0 ]; then
- 20 echo "#FF0000"
- 21 else
- 22 echo "#FFFFFF"
- 23 fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement