Re: [CentOS] Question about Shell Script.

2009-01-31 Thread Semih Gokalp
Thanks for all reply. it works with $() Thanks again everbody. 2009/1/30 William L. Maltby : > > On Fri, 2009-01-30 at 15:56 -0500, Filipe Brandenburger wrote: >> On Fri, Jan 30, 2009 at 13:59, R P Herrold wrote: >> > or for those who are used to being burned: >> > [ 0$NUMBEROFPRO -gt 150

Re: [CentOS] Question about Shell Script.

2009-01-30 Thread William L. Maltby
On Fri, 2009-01-30 at 15:56 -0500, Filipe Brandenburger wrote: > On Fri, Jan 30, 2009 at 13:59, R P Herrold wrote: > > or for those who are used to being burned: > > [ 0$NUMBEROFPRO -gt 150 ] > > Still going to explode if $NUMBEROFPRO contains spaces. Putting in > double quotes will not hel

Re: [CentOS] Question about Shell Script.

2009-01-30 Thread Filipe Brandenburger
On Fri, Jan 30, 2009 at 13:59, R P Herrold wrote: > or for those who are used to being burned: > [ 0$NUMBEROFPRO -gt 150 ] Still going to explode if $NUMBEROFPRO contains spaces. Putting in double quotes will not help you either, since it will complain about it not being numeric... Doing ma

[CentOS] Question about Shell Script.

2009-01-30 Thread R P Herrold
On Fri, 30 Jan 2009, Filipe Brandenburger wrote: > This is wrong, should be [ $NUMBEROFPRO -gt 150 ] instead. or for those who are used to being burned: [ 0$NUMBEROFPRO -gt 150 ] -- Russ herrold ___ CentOS mailing list CentOS@centos.org http://l

Re: [CentOS] Question about Shell Script.

2009-01-30 Thread Filipe Brandenburger
Hi, On Fri, Jan 30, 2009 at 08:40, Semih Gokalp wrote: > if [ $NUMBEROFPRO > 150 ] This is wrong, should be [ $NUMBEROFPRO -gt 150 ] instead. HTH, Filipe ___ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos

Re: [CentOS] Question about Shell Script.

2009-01-30 Thread Alfred von Campe
On Jan 30, 2009, at 8:52, Ralph Angenendt wrote: > By putting `` or $( ) around the call. You can also eliminate the grep altogether: NUMBEROFPRO=/oracle/10.2.0/db_1/bin/sqlplus / as sysdba

Re: [CentOS] Question about Shell Script.

2009-01-30 Thread Ralph Angenendt
Semih Gokalp wrote: > Script print value correctly on screen but NUMBEROFPRO have empty > value in script.How can i take and print NUMBEROFPRO value from above > query ? By putting `` or $( ) around the call. Ralph pgpmjM3C3GFew.pgp Description: PGP signature _

[CentOS] Question about Shell Script.

2009-01-30 Thread Semih Gokalp
Hi all CentOS users, I have writing shell script for check oracle processes in real time and alert with e-mail. I read script like below NUMBEROFPRO=/oracle/10.2.0/db_1/bin/sqlplus / as sysdba < 150 ] then /bin/mail -s "Processes number bigger then 150 !!" myemailadres