#!/bin/ksh # # cc_checkedout # ######################################################################## # set -x ########################################################################## # # Script setup: THIS NEEDS TO BE FIRST # SCRIPTS_DIR="`dirname $0`" PROG_NAME="`basename $0`" if [ "" = "$SCRIPTS_DIR" ]; then SCRIPTS_DIR=/project/dt/scripts fi if [ ! -f $SCRIPTS_DIR/script_setup.ksh ]; then print -u2 "$PROG_NAME: File '$SCRIPTS_DIR/script_setup.ksh' NOT found!" print -u2 "$PROG_NAME: Exiting ..." exit 1 fi . $SCRIPTS_DIR/script_setup.ksh ########################################################################## # # Script specific global variables # COMPONENTS_FILES="" COMPONENTS="" DEBUG="False" DO_DELETE="True" DO_LISTING="True" DO_SUMMARY="True" DO_TMPFILE="True" HAVE_EVENTS="True" CHECKEDOUT_LOG="" LOG_PATH="" MAIL_LIST="" PROG_NAME="`basename $0`" WHAT_TO_SEARCH="-avobs" ########################################################################## # # FUNCTION: do_executive_summary () # do_executive_summary () { AWK_EXEC_CO_SUMMARY='{printf("%-40s [CheckedOut= %-3s; Users= ", $1,$2)}' AWK_EXEC_USER_SUMMARY='{printf("%s ", $1)}' AWK_EXEC_TERM_SUMMARY='{printf("]\n")}' COMPONENT=$1 if [ "True" = "$DEBUG" ]; then print -u2 "summarizing events in $COMPONENT" fi TOTAL_CHECKEDOUT=`$EXTRACT_MSG -l $CHECKEDOUT_LOG $COMPONENT | wc -l | awk '{printf("%s",$1)}'` if [ $TOTAL_CHECKEDOUT -ne 0 ]; then USERS=`$EXTRACT_MSG -l $CHECKEDOUT_LOG $COMPONENT | awk '{ print $1 }' FS="::" | sort | uniq` echo "$COMPONENT $TOTAL_CHECKEDOUT" | awk "$AWK_EXEC_CO_SUMMARY" for u in $USERS do echo "$u" | awk "$AWK_EXEC_USER_SUMMARY" done echo "" | awk "$AWK_EXEC_TERM_SUMMARY" fi } ########################################################################## # # FUNCTION: usage () # usage () { cat <] # Specifies the output file for the report. [{-m | -mail | -mail_list} ] [{-t | -tmpfile} ] # Specifies the tmp file to be extracted from. [{-w | -what | -what_to_search}