Skip to content

Instantly share code, notes, and snippets.

@lussier
Last active December 15, 2015 03:19
Show Gist options
  • Select an option

  • Save lussier/5193774 to your computer and use it in GitHub Desktop.

Select an option

Save lussier/5193774 to your computer and use it in GitHub Desktop.
Checks TOU.TV Show's Availability
# Argument 1: show's name (ex. 19-2)
# Argument 2: season (ex. 02)
# Argument 3: episode (ex. 08)
#!/bin/bash
result=$(curl -I http://www.tou.tv/$1/S$2E$3 | grep "302")
if [ "${result:0:12}" = "HTTP/1.1 302" ];
then
echo "Unavailable";
else
echo "Available";
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment