File: batch-example

package info (click to toggle)
mon 0.99.2-9%2Betch2
  • links: PTS
  • area: main
  • in suites: etch
  • size: 908 kB
  • ctags: 299
  • sloc: perl: 9,801; ansic: 778; sh: 372; makefile: 122
file content (20 lines) | stat: -rwxr-xr-x 296 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/sh
#
# an example of calling moncmd in batch mode
#
# $Id: batch-example 1.1 Sat, 26 Aug 2000 15:22:34 -0400 trockij $
#
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