<?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: ksh - variable size limitation in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-variable-size-limitation/m-p/4535817#M652040</link>
    <description>CDE not installed on our server, so dtksh doesn't exist</description>
    <pubDate>Wed, 18 Nov 2009 08:25:07 GMT</pubDate>
    <dc:creator>Satish Y</dc:creator>
    <dc:date>2009-11-18T08:25:07Z</dc:date>
    <item>
      <title>ksh - variable size limitation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-variable-size-limitation/m-p/4535815#M652038</link>
      <description>Hello experts,&lt;BR /&gt;&lt;BR /&gt;It looks like ksh doesn't support variable sizes equal or greater than 2GB (2147483648)&lt;BR /&gt;&lt;BR /&gt;for e.g.,&lt;BR /&gt;&lt;BR /&gt;# SIZE=1073741824 &lt;BR /&gt;&lt;BR /&gt;# VALUE=17179869184 &lt;BR /&gt;&lt;BR /&gt;# if [ $SIZE -lt $VALUE ]&lt;BR /&gt;&amp;gt; then&lt;BR /&gt;&amp;gt; echo "not ok"&lt;BR /&gt;&amp;gt; else&lt;BR /&gt;&amp;gt; echo "ok"&lt;BR /&gt;&amp;gt; fi&lt;BR /&gt;ok &lt;BR /&gt;&lt;BR /&gt;Where as output should be "not ok"&lt;BR /&gt;&lt;BR /&gt;This is happening because input to the variable VALUE is greater than 2 GB.&lt;BR /&gt;&lt;BR /&gt;# VALUE=17179869184; echo $VALUE&lt;BR /&gt;0&lt;BR /&gt;&lt;BR /&gt;Is there any way to overcome this limitation and define variable to accept values greather than 2GB ?&lt;BR /&gt;&lt;BR /&gt;I tried typeset -E &amp;amp; -F, but not working&lt;BR /&gt;&lt;BR /&gt;I know "bc" don't have such limitation, but I can't pass values directly to "bc", because these variables assigned values after some calculations and expressions, unlike I mentioned above where I assigned values directly to simplify&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Satish.</description>
      <pubDate>Wed, 18 Nov 2009 07:30:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-variable-size-limitation/m-p/4535815#M652038</guid>
      <dc:creator>Satish Y</dc:creator>
      <dc:date>2009-11-18T07:30:15Z</dc:date>
    </item>
    <item>
      <title>Re: ksh - variable size limitation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-variable-size-limitation/m-p/4535816#M652039</link>
      <description>&amp;gt;It looks like ksh doesn't support variable sizes equal or greater than 2GB (2147483648)&lt;BR /&gt;&lt;BR /&gt;Right.  On 11.23, ksh handles 64 bit arithmetic.  But the Posix shell only has 32 bit.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;I tried typeset -E &amp;amp; -F, but not working&lt;BR /&gt;&lt;BR /&gt;/usr/dt/bin/dtksh supports them.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;but I can't pass values directly to "bc"&lt;BR /&gt;&lt;BR /&gt;Why not?  You can pass them in a here document.</description>
      <pubDate>Wed, 18 Nov 2009 08:10:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-variable-size-limitation/m-p/4535816#M652039</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2009-11-18T08:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: ksh - variable size limitation</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-variable-size-limitation/m-p/4535817#M652040</link>
      <description>CDE not installed on our server, so dtksh doesn't exist</description>
      <pubDate>Wed, 18 Nov 2009 08:25:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-variable-size-limitation/m-p/4535817#M652040</guid>
      <dc:creator>Satish Y</dc:creator>
      <dc:date>2009-11-18T08:25:07Z</dc:date>
    </item>
  </channel>
</rss>

