Linux Training

Linux training for private, public & voluntary sector.

0793 572 8612

City LinUX sample scripts - m2sms

NAME

m2sms - creates and sends message to a mail to sms text gateway.

SYNOPSIS

m2sms [ -c <config_file> ] [ .B-d ] [ -v ] <start_time> <event_description> | [ .B-V ]

AVAILABILITY

m2sms is a Bourne shell script which should work equally well on all versions of UNIX, Linux and Mac OS X.

DESCRIPTION

m2sms uses the event and date/time parameters received on the command line to create a subject line to send to the sms gateway. A brief message is also appended to prevent problems which may be experienced if mailx receives a null message.

m2sms is designed to be called by the orage calendar programme to text alerts to the calendar user but could also be used from the command line.

OPTIONS

-c    Use the specified configuration file in preference to the default /usr/local/etc/m2sms.cf. If no configuration file is found the script will attempt to soldier on with the information it has from the command line.

-d    Start in debug mode. The -x    option is set within the shell.

-v    Set verbose mode. Ordinarily m2sms operates silently unless show stopping problems are detected. In verbose mode m2sms reports on each significant action.

-V    m2sms reports the release details and terminates.

EXAMPLES

	m2sms  <start_time> <event_description> 

The appropriate SMS mail gateway for the current user is found in m2sms.cf and mailx is employed to send a message with the subject line " <start_time> <event_description> ".

In the Orage calendar the syntax for setting the Alarm is

	/usr/local/m2sms.cf <&ST> <&T>

BUGS

The script is quite crude having little or no error checking. The consequences of unexpected input are untested.

SEE ALSO

AUTHOR

Clifford W Fulford, City Linux. Contact fulford@fulford.net or +44 (0)709 229 5385.


The layout and associated style sheets for this page are taken from the World Wide Web Consortium and used here under the W3C software licence.