set -aP file=/tmp/sms-result.$$.log targ=$1 msg=`echo "$2 $3" | cut -c-159` txt="`echo "$msg" | sed -e 's/#/%23/g' -e 's/&/%26/g' -e 's/+/ /g'`" txt=`echo "$txt" | cut -c-159` echo -n "`date +'%m%d %H%M%S: '` " > $file while [ -n "$1" ]; do echo -n "$1: " shift done >> $file echo -e "\nResult: " >> $file # delete the nopage file if > 10 minutes old nopage=/var/run/zabbix-server/nopage /usr/bin/find $nopage -mmin +10 | /usr/bin/xargs rm [ -f $nopage ] && echo " $nopage exists." >> $file && exit #echo wget -c -O /tmp/sms-result.$$.log -q "http://api.clickatell.com/http/sendmsg?user=mathx&password=88pricklytel&api_id=3073660&to=$1&text=$txt" > /tmp/cmd.sm! /usr/bin/wget -O - -q "http://api.clickatell.com/http/sendmsg?user=mathx&password=88pricklytel&api_id=3073660&concat=1&to=${targ}&text=$txt" >> $file echo >> $file