#!/bin/sh # send a short message to a mobile phone # $Id$ # read common functions if test -f "$HOME/bin/functions"; then . "$HOME/bin/functions" fi # read local customizations if test -f "$HOME/.sendsms"; then . "$HOME/.sendsms" fi # set command line options if test -n "$1"; then phone="$1" fi # ensure required options are set if test -z "$phone"; then error "$(get_script_name): No phone number defined" exit 2 fi # send the message to the SMS gateway mail -s "user=${user} pass=${pass} phone=${phone} truncate=${truncate}" "${gateway}"