<?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: i need a command for sum in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-command-for-sum/m-p/2791147#M79735</link>
    <description>For a very simplistic script, you can substitue "000" for "k" and "000000" for "m" to scale the numbers-&lt;BR /&gt;&lt;BR /&gt;awk '{sub("k","000");sub("m","000000");s=s+$1}END{printf "%15d\n",s}' yourfile &lt;BR /&gt;&lt;BR /&gt;Hope this helps more...&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
    <pubDate>Wed, 21 Aug 2002 19:21:05 GMT</pubDate>
    <dc:creator>Rodney Hills</dc:creator>
    <dc:date>2002-08-21T19:21:05Z</dc:date>
    <item>
      <title>i need a command for sum</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-command-for-sum/m-p/2791143#M79731</link>
      <description>who know some command for sum a list in a file txt?</description>
      <pubDate>Wed, 21 Aug 2002 18:51:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-command-for-sum/m-p/2791143#M79731</guid>
      <dc:creator>mariano_4</dc:creator>
      <dc:date>2002-08-21T18:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: i need a command for sum</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-command-for-sum/m-p/2791144#M79732</link>
      <description>what abt 'expr' command:&lt;BR /&gt;# man expr</description>
      <pubDate>Wed, 21 Aug 2002 18:52:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-command-for-sum/m-p/2791144#M79732</guid>
      <dc:creator>Sajid_1</dc:creator>
      <dc:date>2002-08-21T18:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: i need a command for sum</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-command-for-sum/m-p/2791145#M79733</link>
      <description>thanks for anwnsner.. but&lt;BR /&gt;&lt;BR /&gt;in the file there are the nex&lt;BR /&gt;&lt;BR /&gt;salida.txt&lt;BR /&gt;&lt;BR /&gt;34k&lt;BR /&gt;24k&lt;BR /&gt;76k&lt;BR /&gt;89m&lt;BR /&gt;50k&lt;BR /&gt;78kb&lt;BR /&gt;&lt;BR /&gt;and i need sum all the numbers.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 21 Aug 2002 19:15:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-command-for-sum/m-p/2791145#M79733</guid>
      <dc:creator>mariano_4</dc:creator>
      <dc:date>2002-08-21T19:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: i need a command for sum</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-command-for-sum/m-p/2791146#M79734</link>
      <description>Usually I use awk-&lt;BR /&gt;&lt;BR /&gt;awk '{s=s+$1}END{print s}' yourfile&lt;BR /&gt;&lt;BR /&gt;This will sum the first field in "yourfile" and print the result.&lt;BR /&gt;&lt;BR /&gt;Hope this helps.&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Wed, 21 Aug 2002 19:16:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-command-for-sum/m-p/2791146#M79734</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2002-08-21T19:16:02Z</dc:date>
    </item>
    <item>
      <title>Re: i need a command for sum</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-command-for-sum/m-p/2791147#M79735</link>
      <description>For a very simplistic script, you can substitue "000" for "k" and "000000" for "m" to scale the numbers-&lt;BR /&gt;&lt;BR /&gt;awk '{sub("k","000");sub("m","000000");s=s+$1}END{printf "%15d\n",s}' yourfile &lt;BR /&gt;&lt;BR /&gt;Hope this helps more...&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Wed, 21 Aug 2002 19:21:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-command-for-sum/m-p/2791147#M79735</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2002-08-21T19:21:05Z</dc:date>
    </item>
    <item>
      <title>Re: i need a command for sum</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-command-for-sum/m-p/2791148#M79736</link>
      <description>tanks "Sajid"&lt;BR /&gt;it's correct &lt;BR /&gt;it's all ok...&lt;BR /&gt;&lt;BR /&gt;see you</description>
      <pubDate>Wed, 21 Aug 2002 23:00:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-command-for-sum/m-p/2791148#M79736</guid>
      <dc:creator>mariano_4</dc:creator>
      <dc:date>2002-08-21T23:00:11Z</dc:date>
    </item>
    <item>
      <title>Re: i need a command for sum</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-command-for-sum/m-p/2791149#M79737</link>
      <description>&lt;BR /&gt;&lt;BR /&gt;How's this??&lt;BR /&gt;&lt;BR /&gt;echo 0 `cat textfile | sed -e "s/ //g" -e "s/RSS/0/" -e "s/M/000K/" -e "s/K/000/" -e "s/^/+ /"` | bc&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;live free or die&lt;BR /&gt;harry</description>
      <pubDate>Thu, 22 Aug 2002 00:02:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/i-need-a-command-for-sum/m-p/2791149#M79737</guid>
      <dc:creator>harry d brown jr</dc:creator>
      <dc:date>2002-08-22T00:02:32Z</dc:date>
    </item>
  </channel>
</rss>

