#!/bin/sh # # $Header: checkCollectionOid.sh 28-nov-01.18:15:44 achoudha Exp $ # # checkCollectionOid.sh # # Copyright (c) Oracle Corporation 2001. All Rights Reserved. # # NAME # checkCollectionOid.sh - # # DESCRIPTION # usage: ckeckinfocollection.sh [] # # NOTES # # # MODIFIED (MM/DD/YY) # achoudha 11/28/01 - # achoudha 11/28/01 - # achoudha 11/28/01 - # achoudha 11/27/01 - # achoudha 11/27/01 - Creation # LOGFILE=/tmp/oid$$.log if [ $# -lt 2 ] then echo "usage: ckeckinfocollection.sh []" >> $LOGFILE 2>&1 exit 1 fi if [ $# -eq 3 ] then hostName=$3 fi oraHome=$1 portNo=$2 if [ $# -eq 3 ] then $oraHome/bin/ldapsearch -h $hostName -p $portNo -b "" -s base "objectclass=*" orclstatsflag|grep orclstatsflag |cut -f2 -d = >> $LOGFILE 2>&1 else $oraHome/bin/ldapsearch -p $portNo -b "" -s base "objectclass=*" orclstatsflag|grep orclstatsflag |grep orclstatsflag |cut -f2 -d = >> $LOGFILE 2>&1 fi cat $LOGFILE exit 0