#!/bin/bash -f
#!============================================================
#! Abs: Executes the SLAC Public system "person" script in DMZ. 
#! 
#! Auth:
#! Author: Dennis Wisinski
#! Owner:  Teresa Downey
#! Email:  teresa@slac.stanford.edu
#! Ext:    2903
#! Group:  SLAC Computing Services
#! Org:    Stanford Linear Accelerator Center (SLAC)
#! 
#! This simple minded forwarder was written by Greg White
#!------------------------------------------------------------
#! Mod:
#!============================================================  
function usage {
echo "
  person lists public information on SLAC personnel

  Usage:
     person [options] attribute  (attribute is normally a person name) 
     Egs,  
        person johnson                Info on all people with name johnson 
        person -match grp 'AE Con Sw' Contact info on whole software grp
        person -match email greg      Email addresses with greg in them

     person -usage   shows the syntax of the command.
     person -options shows all options with a brief description of each.
     person -hints   shows examples of how to use the person command.
"
}

if [ $# -eq 0 ]; then
   echo "No arguments, see person -h for help"
   exit 1;
fi

if [ x${1} = x"-help" ] || [ x${1} = x"-h" ]; then
   usage;
   exit 0;
fi

ssh -llaci mcclogin person ${*}

