Can someone help me figure out how to change this script to check college football scores? Particularly, UT and Big 12 schools?
#!/bin/bash
#This script was written on August 27, 2011 by Kyle R. Jones (kr.jones@me.com)
#Place any number of teams into the team list. This list is then parsed from "http://www.nfl.com/liveupdate/scorestrip/ss.xml"
#for the current score. My intended goal is to use this with geektool.
team=(DAL GB PHI NYG WAS)
for i in ${team[@]}; do
home_city=`curl -s
http://www.nfl.com/liveupdate/scorestrip/ss.xml | grep ${i} | sed -e 's/.*h="\([^"]*\)".*/\1/'`
visiting_city=`curl -s
http://www.nfl.com/liveupdate/scorestrip/ss.xml | grep ${i} | sed -e 's/.*v="\([^"]*\)".*/\1/'`
home_team=`curl -s
http://www.nfl.com/liveupdate/scorestrip/ss.xml | grep ${i} | sed -e 's/.*hnn="\([^"]*\)".*/\1/'`
visiting_team=`curl -s
http://www.nfl.com/liveupdate/scorestrip/ss.xml | grep ${i} | sed -e 's/.*vnn="\([^"]*\)".*/\1/'`
first=`echo ${home_team} | sed 's/\(.\).*/\1/'`
last=`echo ${home_team} | sed 's/.\(.*\)/\1/'`
upper=`echo ${first} | tr '[a-z]' '[A-Z]'`
home_team="$upper$last"
first=`echo ${visiting_team} | sed 's/\(.\).*/\1/'`
last=`echo ${visiting_team} | sed 's/.\(.*\)/\1/'`
upper=`echo ${first} | tr '[a-z]' '[A-Z]'`
visiting_team="$upper$last"
home_score=`curl -s
http://www.nfl.com/liveupdate/scorestrip/ss.xml | grep ${i} | sed -e 's/.*hs="\([^"]*\)".*/\1/'`
visiting_score=`curl -s
http://www.nfl.com/liveupdate/scorestrip/ss.xml | grep ${i} | sed -e 's/.*vs="\([^"]*\)".*/\1/'`
quarter=`curl -s
http://www.nfl.com/liveupdate/scorestrip/ss.xml | grep ${i} | sed -e 's/.*q="\([^"]*\)".*/\1/'`
time_left=`curl -s
http://www.nfl.com/liveupdate/scorestrip/ss.xml | grep ${i} | sed -e 's/.*k="\([^"]*\)".*/\1/'`
day=`curl -s
http://www.nfl.com/liveupdate/scorestrip/ss.xml | grep ${i} | sed -e 's/.*d="\([^"]*\)".*/\1/'`
time=`curl -s
http://www.nfl.com/liveupdate/scorestrip/ss.xml | grep ${i} | sed -e 's/.* t="\([^"]*\)".*/\1/'`
if [ $quarter = "F" ]; then
echo ${visiting_city} ${visiting_team} ${visiting_score} ${home_city} ${home_team} ${home_score} FINAL
elif [ $quarter = "P" ]; then
echo ${visiting_city} ${visiting_team} at ${home_city} ${home_team} on $day at $time Eastern
elif [ $quarter = "H" ]; then
echo ${visiting_city} ${visiting_team} ${visiting_score} ${home_city} ${home_team} ${home_score} HALFTIME
else
if [ $quarter = "1" ]; then
echo ${visiting_city} ${visiting_team} ${visiting_score} ${home_city} ${home_team} ${home_score} with ${time_left} in the ${quarter}st
elif [ $quarter = "2" ]; then
echo ${visiting_city} ${visiting_team} ${visiting_score} ${home_city} ${home_team} ${home_score} with ${time_left} in the ${quarter}nd
elif [ $quarter = "3" ]; then
echo ${visiting_city} ${visiting_team} ${visiting_score} ${home_city} ${home_team} ${home_score} with ${time_left} in the ${quarter}rd
else
echo ${visiting_city} ${visiting_team} ${visiting_score} ${home_city} ${home_team} ${home_score} with ${time_left} in the ${quarter}th
fi
fi
done