#!/usr/bin/ksh

ORACLE_SID=$1
APPL_TOP=$2

if [ -r "${APPL_TOP}/admin/${TWO_TASK:=$ORACLE_SID}/applptch.txt" ];then

  PatchFile=$APPL_TOP/admin/${TWO_TASK:=$ORACLE_SID}/applptch.txt
  AppsRelease=`grep CURRENT_RELEASE $PatchFile | awk '{print $2}'`

elif [ -r "${APPL_TOP}/applptch.txt" ];then

  PatchFile=$APPL_TOP/applptch.txt
  AppsRelease=`grep CURRENT_RELEASE $PatchFile | awk '{print $2}'`

fi

echo "em_result=$AppsRelease"


