#!/bin/csh -f

set name = "$1"
set username = $2
set userinstance = $3
set oshow = $4
set server = $5
set getmsgs = $6
set uid = $7
set file = /tmp/olcr-mail-msgs-${username}${userinstance}.$uid

if ("$name" == "") then
   set name = `/bin/athena/hesinfo $username passwd | /bin/awk -F: '{print substr($5, 0, index($5, ",") - 1)}' | /bin/sed s/\,.\*//g`
   if ("$name" == "") set name = "The Unknown User"
endif

echo \"$name\"
if ($getmsgs == "yes") $oshow -s $server -f $file $username $userinstance >& /dev/null

