#!/bin/sh
#
# an example of calling moncmd in batch mode
#
# $Id: batch-example,v 1.1 1998/07/14 10:05:15 trockij Exp $
#
trap "stty echo && echo && exit" 2

echo -n "Password: "
stty -echo
read p
echo
stty echo

cat <<EOF | moncmd -a
USER=monuser
PASS=$p
list failures
enable host xyz
EOF
