from above output i am looking exclude +ASM output and restout put is fine , also when i select any output and if is invalid from above output, shell script should exit
Rather that ps -ef | grep pmon | grep -v grep | awk ...... might I suggest ps -ef | grep [p]mon | ....... instead. The square brackets are a pattern match that has only one option, but because there is no grep process with this string in the process list, you can save a process and make your code clearer in one go.
If you are able to exclude +ASM , why not ignore that with a grep too?
You can probably get rid of the awk statement too by using different flags for ps, for example ps -eo args= | grep [p]mon | grep -v ASM might get you started.
################################
now from my script when i select any one of the instance from below output script should accept it, if i select wrong instance ..ie abc1111, then it should prompt like invalid entry and exit out
Now, wouldn't that be something that you can do on your own; no - you must do on your own? No one in here knows what DB you run and how to connect to it. And even if someone knew - do you really want to be spoonfed with readymade turnkey solutions?