#!/bin/bash while [ true ] do ip1=`ifconfig | grep -C 1 ppp0 | grep inet | cut -d ":" -f 2 | cut -d " " -f 1` sleep 10 ip2=`ifconfig | grep -C 1 ppp0 | grep inet | cut -d ":" -f 2 | cut -d " " -f 1` if [ $ip1 != $ip2 ] then ddclient fi done