All pastes #745777 Raw Edit

jnm - script sytax error

public text v1 · immutable
·published 2007-10-22 17:58 UTC
rendered paste body
#!/usr/bin/ksh

MAILLIST="james.mchargue@alltel.com"

if [ $1 ] ; then
        searchdate=$1
else
        searchdate=`date '+%Y%m%d'`
fi

bufferDrained=`/ldaphome/e0119990/xgrep.ksh "fgrep '$searchdate'" /logs/InterchangeSystem.log | fgrep 'buffer is now drained' | cut -d [ -f 7 | cut -d : -f 2 | cut -d . -f 1 | sort | uniq -c'
mail -t $MAILLIST << EOF
Subject:$searchdate wbip01X - collab max event capacity report
This email contains the number of times any given collab reached 
it's maximum event capacity, drained it's buffer and went to a blocked state
on $searchdate.

Please do not reply to this email.

Count	Information message
$bufferDrained

EOF