#!/bin/ksh
#
#####
#####  Written by Paul A. Luzzi
#####    on 05-19-1998
#####
#####  Theory is to use the /etc/oratab "startup" file for use in telling
#####    which databases to perform actions on, like shutdowns, exports, etc.
#####    This may be useful, to be able to makes scripts EXTREMELY portable.
#####

#####
#####  Start by catting the /etc/oratab, and we begin processing.
#####
cat /etc/oratab | \

  #####
  #####  Now grep out any comment lines so we get just data, and for each ....
  #####
  grep -v ^# | \
  while read ORATABLINE	
    do
      echo $ORATABLINE | \

      #####
      #####  echo the line, and use ":" as field separator.  Then just echo
      #####    off the fields (with descriptors)
      #####
      awk -F: '{ if ( $3 == "Y" ) print $1 " "}'
    done

#####
#####  end of parse_oratab.sh
#####
