<?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 awk script in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729740#M65112</link>
    <description>Hi&lt;BR /&gt;&lt;BR /&gt;This is my script&lt;BR /&gt;&lt;BR /&gt;ls -l *.t | awk '{ print x +=$5 }'&lt;BR /&gt;&lt;BR /&gt;it should add all the bytes for *.t files.&lt;BR /&gt;but i am getting 2.11362e+08. how to get&lt;BR /&gt;correct bytes.</description>
    <pubDate>Thu, 23 May 2002 02:37:47 GMT</pubDate>
    <dc:creator>skravi17</dc:creator>
    <dc:date>2002-05-23T02:37:47Z</dc:date>
    <item>
      <title>awk script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729740#M65112</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;This is my script&lt;BR /&gt;&lt;BR /&gt;ls -l *.t | awk '{ print x +=$5 }'&lt;BR /&gt;&lt;BR /&gt;it should add all the bytes for *.t files.&lt;BR /&gt;but i am getting 2.11362e+08. how to get&lt;BR /&gt;correct bytes.</description>
      <pubDate>Thu, 23 May 2002 02:37:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729740#M65112</guid>
      <dc:creator>skravi17</dc:creator>
      <dc:date>2002-05-23T02:37:47Z</dc:date>
    </item>
    <item>
      <title>Re: awk script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729741#M65113</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;The output is 200 meg&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Thu, 23 May 2002 02:42:51 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729741#M65113</guid>
      <dc:creator>steven Burgess_2</dc:creator>
      <dc:date>2002-05-23T02:42:51Z</dc:date>
    </item>
    <item>
      <title>Re: awk script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729742#M65114</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;Another way of doing it would be to&lt;BR /&gt;&lt;BR /&gt;ls -l  &lt;FILES&gt; | awk '{ print $5 } &amp;gt; /tmp/totals&lt;BR /&gt;&lt;BR /&gt;Then add the totals in the file with&lt;BR /&gt;&lt;BR /&gt;cat /tmp/totals | awk 'BEGIN {total=0;} {total=total+$1;} END {print total,"\n";}'&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Steve&lt;BR /&gt;&lt;/FILES&gt;</description>
      <pubDate>Thu, 23 May 2002 02:45:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729742#M65114</guid>
      <dc:creator>steven Burgess_2</dc:creator>
      <dc:date>2002-05-23T02:45:57Z</dc:date>
    </item>
    <item>
      <title>Re: awk script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729743#M65115</link>
      <description>Hi again&lt;BR /&gt;&lt;BR /&gt;Sorry, the correct value is 211,362,000&lt;BR /&gt;&lt;BR /&gt;2^8&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Thu, 23 May 2002 02:48:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729743#M65115</guid>
      <dc:creator>steven Burgess_2</dc:creator>
      <dc:date>2002-05-23T02:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: awk script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729744#M65116</link>
      <description>Use the printf function within awk .. for example ..&lt;BR /&gt;&lt;BR /&gt;# ls -l *.t | awk '{ printf ("%10.2f\n",x+=$5) }'&lt;BR /&gt;&lt;BR /&gt;That will give you 10 digits before the decimel point and 2 digits after the decimel point.&lt;BR /&gt;</description>
      <pubDate>Thu, 23 May 2002 03:56:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729744#M65116</guid>
      <dc:creator>S.K. Chan</dc:creator>
      <dc:date>2002-05-23T03:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: awk script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729745#M65117</link>
      <description>Hi&lt;BR /&gt;Thanks steven and skchan. skchan script&lt;BR /&gt;rectified my problem.</description>
      <pubDate>Thu, 23 May 2002 04:07:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729745#M65117</guid>
      <dc:creator>skravi17</dc:creator>
      <dc:date>2002-05-23T04:07:16Z</dc:date>
    </item>
    <item>
      <title>Re: awk script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729746#M65118</link>
      <description>Hi&lt;BR /&gt;&lt;BR /&gt;I see you are a new forum user&lt;BR /&gt;&lt;BR /&gt;You can assign points by clicking on the 'assign points' tab next to replies&lt;BR /&gt;&lt;BR /&gt;Regards&lt;BR /&gt;&lt;BR /&gt;Steve</description>
      <pubDate>Thu, 23 May 2002 04:10:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729746#M65118</guid>
      <dc:creator>steven Burgess_2</dc:creator>
      <dc:date>2002-05-23T04:10:50Z</dc:date>
    </item>
    <item>
      <title>Re: awk script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729747#M65119</link>
      <description>Just multiply the fraction by 100.&lt;BR /&gt;&lt;BR /&gt;Naga</description>
      <pubDate>Thu, 23 May 2002 04:51:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729747#M65119</guid>
      <dc:creator>Nagarathinam</dc:creator>
      <dc:date>2002-05-23T04:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: awk script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729748#M65120</link>
      <description>The result obtained is in MBs.&lt;BR /&gt;&lt;BR /&gt;Naga</description>
      <pubDate>Thu, 23 May 2002 04:53:52 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729748#M65120</guid>
      <dc:creator>Nagarathinam</dc:creator>
      <dc:date>2002-05-23T04:53:52Z</dc:date>
    </item>
    <item>
      <title>Re: awk script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729749#M65121</link>
      <description># perl -le '$s+=-s for&amp;lt;*.t&amp;gt;;print$s'&lt;BR /&gt;&lt;BR /&gt;or reformatted to your liking&lt;BR /&gt;&lt;BR /&gt;perl -le '$s+=-s for&amp;lt;*.t&amp;gt;;printf"%8.2f",$s'&lt;BR /&gt;</description>
      <pubDate>Thu, 23 May 2002 11:15:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729749#M65121</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2002-05-23T11:15:23Z</dc:date>
    </item>
    <item>
      <title>Re: awk script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729750#M65122</link>
      <description>Only one person pointed out the correct solution, but didnt explain the problem.&lt;BR /&gt;&lt;BR /&gt;Problem: printing num E&lt;BR /&gt;This is the behavior of the print statement in awk.&lt;BR /&gt;&lt;BR /&gt;Solution: use printf&lt;BR /&gt;printf() syntax is exactly like in C programming.&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Shannon</description>
      <pubDate>Thu, 23 May 2002 18:16:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729750#M65122</guid>
      <dc:creator>Shannon Petry</dc:creator>
      <dc:date>2002-05-23T18:16:20Z</dc:date>
    </item>
    <item>
      <title>Re: awk script</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729751#M65123</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;unfortunately awk uses internally a floating point arithmetic. That is less accurate than using integer arithmitic with same variable size, because some of the bytes are used for the exponent. &lt;BR /&gt;&lt;BR /&gt;Regards, Klaus</description>
      <pubDate>Fri, 24 May 2002 07:35:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/awk-script/m-p/2729751#M65123</guid>
      <dc:creator>Klaus Crusius</dc:creator>
      <dc:date>2002-05-24T07:35:38Z</dc:date>
    </item>
  </channel>
</rss>

