#!/bin/sh . slib help() { cat << EOF ${0}: Wrapper script to send notifications options: -s [Name] [Msg] Send Msg with Name -s [Msg] Send Msg Without Name -h Print this message and exit EOF exit 0 } case "${#}" in 1) [ "${1}" = "-h" ] && help invalid_use ;; 2) [ "${1}" = "-s" ] || invalid_use notification_string="${2}" ;; 3) [ "${1}" = "-s" ] || invalid_use notification_string="${2}: ${3}" ;; *) invalid_use ;; esac send_notification "${notification_string}"