<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Addition in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3848158#M274429</link>
    <description>Hi Pratibha,&lt;BR /&gt;looking at your script I found an error: using ps -ef|grep ora|wc -l we include in the count also the command line. To avoid this use: ps -ef|grep [o]ra|wc -l. In this way we will the correct counter.&lt;BR /&gt;But if your goal is know the numnber of Oracle process this is wrong because using ora you got also all teh process for user oracle.&lt;BR /&gt;Just my .02$&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
    <pubDate>Wed, 23 Aug 2006 03:08:53 GMT</pubDate>
    <dc:creator>Arturo Galbiati</dc:creator>
    <dc:date>2006-08-23T03:08:53Z</dc:date>
    <item>
      <title>Addition</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3848149#M274420</link>
      <description>Hi All,&lt;BR /&gt;&lt;BR /&gt;I have a script which I get the line counts from three servers. For an instance, I get the output from the script 30, 34 and 37. I wanted to add these three numbers dynamically in the script itself so that I don't need to add manually. I know I can use "bc" command from unix prompt but I want add the number what I get from the output in the script itself. Any help is greatly appreciated?&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Pratibha</description>
      <pubDate>Tue, 22 Aug 2006 10:36:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3848149#M274420</guid>
      <dc:creator>Qcheck</dc:creator>
      <dc:date>2006-08-22T10:36:38Z</dc:date>
    </item>
    <item>
      <title>Re: Addition</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3848150#M274421</link>
      <description>An example of how the script is run and how you get the output would be helpful.  &lt;BR /&gt;</description>
      <pubDate>Tue, 22 Aug 2006 10:41:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3848150#M274421</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2006-08-22T10:41:03Z</dc:date>
    </item>
    <item>
      <title>Re: Addition</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3848151#M274422</link>
      <description>As long as the values are integers and are in the range -2^31 - +2^31 - 1 then it's quite simple:&lt;BR /&gt;&lt;BR /&gt;typeset -i A=30&lt;BR /&gt;typeset -i B=34&lt;BR /&gt;typeset -i C=37&lt;BR /&gt;typeset -i TOT=0&lt;BR /&gt;TOT=$(( ${A} + ${B} + ${C} ))&lt;BR /&gt;echo "Total: ${TOT}"&lt;BR /&gt;&lt;BR /&gt;You can also call the external command expr to add these values but the POSIX and Korn shell will handle this all internally.&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Aug 2006 10:41:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3848151#M274422</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-08-22T10:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: Addition</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3848152#M274423</link>
      <description>Please check the script I am using:&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;&lt;BR /&gt;        NODES="xx yy zz"&lt;BR /&gt;        for i in $NODES&lt;BR /&gt;        do&lt;BR /&gt;&lt;BR /&gt;{&lt;BR /&gt;&lt;BR /&gt;        echo " "&lt;BR /&gt;        echo "*************************${i}****************************"&lt;BR /&gt;        echo " "&lt;BR /&gt;        rsh ${i} "ps -ef|grep ora | wc -l"&lt;BR /&gt;&lt;BR /&gt;}&lt;BR /&gt;        done&lt;BR /&gt;&lt;BR /&gt;# THE END!&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Aug 2006 10:45:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3848152#M274423</guid>
      <dc:creator>Qcheck</dc:creator>
      <dc:date>2006-08-22T10:45:44Z</dc:date>
    </item>
    <item>
      <title>Re: Addition</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3848153#M274424</link>
      <description>Easy:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;&lt;BR /&gt;typeset NODES="xx yy zz"&lt;BR /&gt;typeset -i=""&lt;BR /&gt;typeset -i TOT=0&lt;BR /&gt;typeset -i K=0&lt;BR /&gt;for i in ${NODES}&lt;BR /&gt;do&lt;BR /&gt;{&lt;BR /&gt;echo " "&lt;BR /&gt;echo "*************************${i}****************************"&lt;BR /&gt;echo " "&lt;BR /&gt;K=$(remsh ${i} ps -ef | grep ora | wc -l)&lt;BR /&gt;((TOT+=K))&lt;BR /&gt;}&lt;BR /&gt;done&lt;BR /&gt;echo "Total: ${TOT}"&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Aug 2006 11:00:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3848153#M274424</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-08-22T11:00:28Z</dc:date>
    </item>
    <item>
      <title>Re: Addition</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3848154#M274425</link>
      <description>Hi Clay,&lt;BR /&gt;&lt;BR /&gt;Thank you for the response but erroring out at typeset, saying typeset: bad options. Any ideas?&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 22 Aug 2006 11:14:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3848154#M274425</guid>
      <dc:creator>Qcheck</dc:creator>
      <dc:date>2006-08-22T11:14:01Z</dc:date>
    </item>
    <item>
      <title>Re: Addition</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3848155#M274426</link>
      <description>This is legal Korn/POSIX shell syntax; I suspect that you are posting a non-HPUX question in an HP-UX forum. I got that idea from /bin/ksh which is the wrong place. It should be /usr/bin/ksh. In any event, change the&lt;BR /&gt;typeset -i  K=0&lt;BR /&gt;to simply K=0&lt;BR /&gt;&lt;BR /&gt;The typeset is optional but it does make the computations more efficient.&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Aug 2006 11:19:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3848155#M274426</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-08-22T11:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: Addition</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3848156#M274427</link>
      <description>oops, this was a bad line:&lt;BR /&gt;&lt;BR /&gt;typeset -i=""&lt;BR /&gt;&lt;BR /&gt;It should be &lt;BR /&gt;typeset i=""&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Aug 2006 11:21:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3848156#M274427</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2006-08-22T11:21:18Z</dc:date>
    </item>
    <item>
      <title>Re: Addition</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3848157#M274428</link>
      <description>Thank you Steve, it is working now. Thanks a lot for the sooner help.&lt;BR /&gt;&lt;BR /&gt;Thanks again,&lt;BR /&gt;Pratibha</description>
      <pubDate>Tue, 22 Aug 2006 11:27:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3848157#M274428</guid>
      <dc:creator>Qcheck</dc:creator>
      <dc:date>2006-08-22T11:27:29Z</dc:date>
    </item>
    <item>
      <title>Re: Addition</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3848158#M274429</link>
      <description>Hi Pratibha,&lt;BR /&gt;looking at your script I found an error: using ps -ef|grep ora|wc -l we include in the count also the command line. To avoid this use: ps -ef|grep [o]ra|wc -l. In this way we will the correct counter.&lt;BR /&gt;But if your goal is know the numnber of Oracle process this is wrong because using ora you got also all teh process for user oracle.&lt;BR /&gt;Just my .02$&lt;BR /&gt;HTH,&lt;BR /&gt;Art</description>
      <pubDate>Wed, 23 Aug 2006 03:08:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3848158#M274429</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2006-08-23T03:08:53Z</dc:date>
    </item>
  </channel>
</rss>

