Change website

From Jan 16 2015,


All post content will be move to we's offical website with many content...

Can access website here: http://justox.com

Thanks for your visit!

Thursday, 19 December 2013

Shell Script for Cricket Score

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

No comments:

Post a Comment