<?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: Shel Script Calculation in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/shel-script-calculation/m-p/5002228#M424682</link>
    <description>&lt;!--!*#--&gt;thanks</description>
    <pubDate>Sat, 09 Sep 2006 08:56:00 GMT</pubDate>
    <dc:creator>KAMARULZAMAN HJ ALI</dc:creator>
    <dc:date>2006-09-09T08:56:00Z</dc:date>
    <item>
      <title>Shel Script Calculation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shel-script-calculation/m-p/5002225#M424679</link>
      <description>Hi,&lt;BR /&gt;Please find my shell script :&lt;BR /&gt;let Total=0&lt;BR /&gt;for i in `cat data1.dat`&lt;BR /&gt;do&lt;BR /&gt;let Total=$Total+1&lt;BR /&gt;done&lt;BR /&gt;echo $Total&lt;BR /&gt;&lt;BR /&gt;I have series of integer number stored in data1.dat file.&lt;BR /&gt;If the range too huge, my calculation become wrong.&lt;BR /&gt;Please help.&lt;BR /&gt;Thanks&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Sat, 09 Sep 2006 06:01:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shel-script-calculation/m-p/5002225#M424679</guid>
      <dc:creator>KAMARULZAMAN HJ ALI</dc:creator>
      <dc:date>2006-09-09T06:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: Shel Script Calculation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shel-script-calculation/m-p/5002226#M424680</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;Try to use awk or perl for calculations&lt;BR /&gt;&lt;BR /&gt;HTH</description>
      <pubDate>Sat, 09 Sep 2006 07:20:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shel-script-calculation/m-p/5002226#M424680</guid>
      <dc:creator>Victor Fridyev</dc:creator>
      <dc:date>2006-09-09T07:20:15Z</dc:date>
    </item>
    <item>
      <title>Re: Shel Script Calculation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shel-script-calculation/m-p/5002227#M424681</link>
      <description>Hi:&lt;BR /&gt;&lt;BR /&gt;You are limited by the shell's 32-bit arithmetic.  As noted, by Victor, 'awk' or Perl would provide a solution.  Based upon your example, to sum the first field found in your file, do:&lt;BR /&gt;&lt;BR /&gt;# awk 'END{print N};{N+=$1+0}' data1.dat&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Sat, 09 Sep 2006 07:43:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shel-script-calculation/m-p/5002227#M424681</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2006-09-09T07:43:45Z</dc:date>
    </item>
    <item>
      <title>Re: Shel Script Calculation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/shel-script-calculation/m-p/5002228#M424682</link>
      <description>&lt;!--!*#--&gt;thanks</description>
      <pubDate>Sat, 09 Sep 2006 08:56:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/shel-script-calculation/m-p/5002228#M424682</guid>
      <dc:creator>KAMARULZAMAN HJ ALI</dc:creator>
      <dc:date>2006-09-09T08:56:00Z</dc:date>
    </item>
  </channel>
</rss>

