#!/usr/local/bin/perl
#
# usage: call_pager phone_number_of_pager number_to_send_to_pager
#
#
# Copyright (1995) The Board of Trustees of the Leland Stanford Junior
# Univeristy.  Except for commercial resale, lease, license or other commercial
# transactions, permission is hereby given to use, copy, modify, and distribute
# this software -- by exercising this permission you agree that this Notice
# shall accompany this software at all times. 
# 
# STANFORD MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING
# THIS SOFTWARE.
#
eval '/usr/local/bin/perl -S $0 ${1+"$@"}'
    if 0 ;
#
$ENV{'PATH'} = '/usr/ucb:/usr/bin:/bin:/usr/local/bin' ;
$ENV{'IFS'} = '' if $ENV{'IFS'} ne '' ;


if ($#ARGV != 1) {
  die "usage: $0 phone_number_of_pager number_to_send_to_pager\n" ;
}

$TIP = '/bin/tip' ;
$PhoneNum = $ARGV[0] ;
$NumberToSend = $ARGV[1] ;

close(STDOUT);
close(STDERR);
exec("$TIP 9,$PhoneNum,,,,$NumberToSend") ;

