#!/usr/bin/ksh # author : B. Polarski # program : smenu_dsk.sh # purpose : Display table/view structure # Date : December 2000 # set -x help() { cat <] dsk VIEW [-u ] dsk OWNER.TABLE dsk OWNER.VIEW dsk -p # just produce a list of what exists dsk -c [-u [OWNER>] note : You can omit OWNER if the OWNER is \$S_USER (default Smenu user) EOF exit 0 } if [ -z "$1" ];then echo " I need something to describe !" help fi typeset -u TBL while [ -n "$1" ] do case $1 in -u ) OWNER=`echo $2| awk '{print toupper($1)'}` AND_OWNER=" and owner = '$OWNER'" shift ;; -c ) ACTION=COMMENT;; -p ) TBL=$2 ; shift ; ACTION=LIKE ;; -h|-help ) help ;; * ) TBL=$1 ;; esac shift done #--------------- declare some parameters ------------- . $SBIN/scripts/passwd.env . ${GET_PASSWD} $S_USER $ORACLE_SID if [ "x-$CONNECT_STRING" = "x-" ];then echo "could no get a the password of $S_USER" exit 0 fi if [ "$ACTION" = "COMMENT" ];then sqlplus -s "$CONNECT_STRING" <