Sunday, April 17, 2011

script - checking Betamax rates with a cronjob

This little script can be extended or modified with your own sip providers. It is useful for me to keep and eye open with one of the providers that I'm currently using.


LAST_RATE=$(cat ./md5_12voip.txt | awk '{print $1}')
lynx --dump | \
grep -E 'Sweden|Spain' | md5sum > ./md5_12voip.txt
NOW_RATE=$(cat ./md5_12voip.txt | awk '{print $1}')

if [ $LAST_RATE = $NOW_RATE ]; then
echo "no change on rates"
export DISPLAY=:0 && zenity --info --text 'Betamax 12voip rates changed \
for Sweden or Spain, check page:'

No comments:


Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.