Re: korn shell scripts help

From: Saxon, Lamar (Lamar.Saxon@AMERICREDIT.COM)
Date: Thu Jun 20 2002 - 16:38:41 EDT


(ps -ef | grep ora_smon_raas | grep -v grep) && snmptrap -v 2c -c public
localhost "" .1.3.6.1.4.1.2021.251.1

from within a script -

$(ps -ef | grep ora_smon_raas | grep -v grep) && snmptrap -v 2c -c public
localhost "" .1.3.6.1.4.1.2021.251.1

HTH,
Lamar

-----Original Message-----
From: Raj Ramakrishnan [mailto:RRamakri@MTABT.ORG]
Sent: Thursday, June 20, 2002 3:24 PM
To: aix-l@Princeton.EDU
Subject: korn shell scripts help

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