<?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: Does anyone know this:? (Number processing!) in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755388#M258382</link>
    <description>Hi, &lt;BR /&gt;&lt;BR /&gt;The Logic with "dc" is simple, number of + signs = (n-1)&lt;BR /&gt;&lt;BR /&gt;# echo "1 2 3 4 5 + + + + p" | dc&lt;BR /&gt;&lt;BR /&gt;You need to specify four + signs here. &lt;BR /&gt;&lt;BR /&gt;-Arun</description>
    <pubDate>Tue, 21 Mar 2006 07:35:21 GMT</pubDate>
    <dc:creator>Arunvijai_4</dc:creator>
    <dc:date>2006-03-21T07:35:21Z</dc:date>
    <item>
      <title>Does anyone know this:? (Number processing!)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755378#M258372</link>
      <description>Hi All ,&lt;BR /&gt;&lt;BR /&gt;Q: Does anyone know , how add 5 numbers using dc ?&lt;BR /&gt; &lt;BR /&gt;I have checked man page but not able to understand much. Nor I got a good guide to do this.&lt;BR /&gt;&lt;BR /&gt;I can use this command to add 2 number , but unable to do more than 2.&lt;BR /&gt;&lt;BR /&gt;# echo " 5 7 + p " | dc &lt;BR /&gt;12&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks in advance.&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Mar 2006 01:36:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755378#M258372</guid>
      <dc:creator>rveri</dc:creator>
      <dc:date>2006-03-21T01:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone know this:? (Number processing!)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755379#M258373</link>
      <description>I can.&lt;BR /&gt;&lt;BR /&gt;export p=9&lt;BR /&gt;echo "2+5+$p" |bc&lt;BR /&gt;&lt;BR /&gt;All is fine.</description>
      <pubDate>Tue, 21 Mar 2006 02:04:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755379#M258373</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2006-03-21T02:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone know this:? (Number processing!)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755380#M258374</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Another way to add three number :&lt;BR /&gt;Hpux:/# let 'p=5+7'&lt;BR /&gt;Hpux:/# echo $p&lt;BR /&gt;Hpux:/# 12&lt;BR /&gt;Hpux:/# let 'q=5+7+p'&lt;BR /&gt;Hpux:/# echo $q&lt;BR /&gt;Hpux:/# 24&lt;BR /&gt;&lt;BR /&gt;Hope this helps&lt;BR /&gt;Pat</description>
      <pubDate>Tue, 21 Mar 2006 02:21:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755380#M258374</guid>
      <dc:creator>Patrice Le Guyader</dc:creator>
      <dc:date>2006-03-21T02:21:06Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone know this:? (Number processing!)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755381#M258375</link>
      <description>Hello rveri&lt;BR /&gt;&lt;BR /&gt;Did you try:&lt;BR /&gt;&lt;BR /&gt;# echo " 3 4 5 + + p" | dc&lt;BR /&gt;12&lt;BR /&gt;&lt;BR /&gt;echo " 3 4 5 * + p" | dc&lt;BR /&gt;23&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;rgds &lt;BR /&gt;HGH&lt;BR /&gt;</description>
      <pubDate>Tue, 21 Mar 2006 02:26:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755381#M258375</guid>
      <dc:creator>Hemmetter</dc:creator>
      <dc:date>2006-03-21T02:26:28Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone know this:? (Number processing!)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755382#M258376</link>
      <description>rveri,&lt;BR /&gt;for 5 number is would be:&lt;BR /&gt;# echo " 3 4 5 6 7 + + + + p"|dc&lt;BR /&gt;25&lt;BR /&gt;&lt;BR /&gt;Why the use of dc?</description>
      <pubDate>Tue, 21 Mar 2006 02:53:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755382#M258376</guid>
      <dc:creator>Peter Godron</dc:creator>
      <dc:date>2006-03-21T02:53:23Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone know this:? (Number processing!)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755383#M258377</link>
      <description>hi,&lt;BR /&gt;if you can put it all in a file,&lt;BR /&gt;&lt;BR /&gt;e.g.&lt;BR /&gt;&lt;BR /&gt;12&lt;BR /&gt;23&lt;BR /&gt;34&lt;BR /&gt;45&lt;BR /&gt;45&lt;BR /&gt;56&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;you can then just do:&lt;BR /&gt;cat datafile.lis | awk '{sum=sum+$1} End {print sum}'&lt;BR /&gt;&lt;BR /&gt;hope this helps too!&lt;BR /&gt;&lt;BR /&gt;kind regards&lt;BR /&gt;yogeeraj</description>
      <pubDate>Tue, 21 Mar 2006 02:57:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755383#M258377</guid>
      <dc:creator>Yogeeraj_1</dc:creator>
      <dc:date>2006-03-21T02:57:30Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone know this:? (Number processing!)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755384#M258378</link>
      <description>Hi rveri,&lt;BR /&gt;&lt;BR /&gt;To add 5 numbers using dc you could do either way&lt;BR /&gt;&lt;BR /&gt;echo "5 +5 +5 +5 +5 +p"|dc&lt;BR /&gt;25&lt;BR /&gt;&lt;BR /&gt;echo "5 5 5 5 5 +++++p"|dc&lt;BR /&gt;25&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Indira A</description>
      <pubDate>Tue, 21 Mar 2006 03:18:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755384#M258378</guid>
      <dc:creator>Indira Aramandla</dc:creator>
      <dc:date>2006-03-21T03:18:14Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone know this:? (Number processing!)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755385#M258379</link>
      <description>Try as,&lt;BR /&gt;&lt;BR /&gt;# echo "5 7 9 11 13 + + + + p" | dc&lt;BR /&gt;&lt;BR /&gt;More ways are there,&lt;BR /&gt;&lt;BR /&gt;a) expr&lt;BR /&gt;b) awk&lt;BR /&gt;c) echo $(())&lt;BR /&gt;d) perl&lt;BR /&gt;&lt;BR /&gt;etc.&lt;BR /&gt;&lt;BR /&gt;--&lt;BR /&gt;Muthu</description>
      <pubDate>Tue, 21 Mar 2006 03:24:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755385#M258379</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2006-03-21T03:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone know this:? (Number processing!)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755386#M258380</link>
      <description>Hello, &lt;BR /&gt;&lt;BR /&gt;Easiest way in perl, &lt;BR /&gt;&lt;BR /&gt;# perl -e "print 10+20+30+40+50"&lt;BR /&gt;&lt;BR /&gt;-Arun</description>
      <pubDate>Tue, 21 Mar 2006 03:30:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755386#M258380</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2006-03-21T03:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone know this:? (Number processing!)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755387#M258381</link>
      <description>hi,&lt;BR /&gt;&lt;BR /&gt;You can use &lt;BR /&gt;# echo " 1 2 3 4 +++ p " | dc &lt;BR /&gt;10&lt;BR /&gt;#&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;You can also use :&lt;BR /&gt;1. awk&lt;BR /&gt;2. expr&lt;BR /&gt;3. echo&lt;BR /&gt;4. perl&lt;BR /&gt;5. sed&lt;BR /&gt;6. bc&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Cheers,&lt;BR /&gt;Raj.</description>
      <pubDate>Tue, 21 Mar 2006 06:00:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755387#M258381</guid>
      <dc:creator>Raj D.</dc:creator>
      <dc:date>2006-03-21T06:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone know this:? (Number processing!)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755388#M258382</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;The Logic with "dc" is simple, number of + signs = (n-1)&lt;BR /&gt;&lt;BR /&gt;# echo "1 2 3 4 5 + + + + p" | dc&lt;BR /&gt;&lt;BR /&gt;You need to specify four + signs here. &lt;BR /&gt;&lt;BR /&gt;-Arun</description>
      <pubDate>Tue, 21 Mar 2006 07:35:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755388#M258382</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2006-03-21T07:35:21Z</dc:date>
    </item>
    <item>
      <title>Re: Does anyone know this:? (Number processing!)</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755389#M258383</link>
      <description>Hi Rveri,&lt;BR /&gt;why not?&lt;BR /&gt;echo "1+2+3+4+5"|bc&lt;BR /&gt;HTH,&lt;BR /&gt;Art&lt;BR /&gt;</description>
      <pubDate>Wed, 22 Mar 2006 04:46:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/does-anyone-know-this-number-processing/m-p/3755389#M258383</guid>
      <dc:creator>Arturo Galbiati</dc:creator>
      <dc:date>2006-03-22T04:46:57Z</dc:date>
    </item>
  </channel>
</rss>

