Here’s a script that I wrote to get the latest cricket score without visiting the site. It’s a shell script that makes use of rediff scores.
#!/bin/bash
lynx=`which lynx`
if [ -z $lynx ]; then
lynx=`which curl`
option=”-s”
else
lynx=$lynx
option=”-dump”
fi
SCORE_URL=”http://livechat.rediff.com:80/sports/score/score.txt”
live_score=`$lynx $option $SCORE_URL`
VS=`echo “$live_score”|grep “l1=”|cut -d= -f2`
score=`echo “$live_score”|grep “message=”|cut -d= -f2`
CU=`echo “$live_score”|grep “tagline=” | cut -d= -f2`
echo “Current Match $VS\n”
echo “Score: $score\n”
echo “Batsmen: $CU\n”
Don’t copy paste the above script directly. Just use given command to download.
wget -O score.sh prajith.in/script/score.sh
Shell Script for Cricket Score!!!
Asking questions are really nice thing if you are not
understanding something totally, but this post presents good understanding even.