Wednesday, November 25, 2015

Display cricket score on Unix Terminal

If your job demands you to be on Unix console all the time and you happen to be one who can not avoid watching the cricket score, something you would like:
The script:
#Get cricket score on your unix console top corner, enjoy cricket while you work ..

columns=$(tput cols)

while :
  line=$(wget -q -O- $matchurl  | awk -F '=' '/og:title/ {print $3}' | awk -F '|' '{print $1}' | sed 's/"//g')
  echo -en "\033[s"    #save current screen position & attributes
  tput cup 0 $startpoint
  echo -en "\033[42m$line\033[0m"
  echo -e -n "\033[u"
  sleep 15


Unknown said...

This is great. Can you create something similar for football? :P

Unknown said...

Thanks Rakesh !

Unknown said...

Thanks for sharing.
More unix command lines here:

deepak singh said...

Thanks for providing this informative information you may also refer.

Ram Chauhan said...

Good post....thanks for sharing.. very useful for me... Thanks. Complete Set of Desktop on Rent

© Jadu Saikia