korn shell scripts help

From: Raj Ramakrishnan (RRamakri@MTABT.ORG)
Date: Thu Jun 20 2002 - 16:23:38 EDT


Hi all

I need help writing this script when I execute this command

ps -ef | grep ora_smon_raas ( if the output this )

  root 22010 47030 1 16:12:31 pts/0 0:00 grep ora_smon_raas
  oracle 31582 1 0 08:30:53 - 0:08 ora_smon_raas

then execute this command

snmptrap -v 2c -c public localhost "" .1.3.6.1.4.1.2021.251.1

ps -ef | grep ora_smon_raas (If the output this )

root 22010 47030 1 16:12:31 pts/0 0:00 grep ora_smon_raas

then do not execute this command.

snmptrap -v 2c -c public localhost "" .1.3.6.1.4.1.2021.251.1

Thanks
raj

  



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 22:16:00 EDT