<?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: addition in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3242388#M173887</link>
    <description>The typeset shell command will do what you want:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;typeset -i10 one=01&lt;BR /&gt;((one += 05))&lt;BR /&gt;echo "One = ${one}"&lt;BR /&gt;# Now let's apply a typeset&lt;BR /&gt;typeset -Z2 one&lt;BR /&gt;echo "Now one = ${one}"&lt;BR /&gt;&lt;BR /&gt;NOTE: You could also apply a typeset for a new variable used only for display:&lt;BR /&gt;typeset -i10 one=01&lt;BR /&gt;((one += 05))&lt;BR /&gt;echo "One = ${one}"&lt;BR /&gt;# Now let's apply a typeset&lt;BR /&gt;typeset -Z2 newone=${one}&lt;BR /&gt;echo "Newone = ${newone}"&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Wed, 07 Apr 2004 09:17:03 GMT</pubDate>
    <dc:creator>A. Clay Stephenson</dc:creator>
    <dc:date>2004-04-07T09:17:03Z</dc:date>
    <item>
      <title>addition</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3242385#M173884</link>
      <description>Hi,&lt;BR /&gt;&lt;BR /&gt;I am adding up like this&lt;BR /&gt;one=01&lt;BR /&gt;adding + 05 using&lt;BR /&gt;let one=$one+05. I get output 6 which is correct. I want to get it as 06 instead of 6.&lt;BR /&gt;Any help would be appreciated.&lt;BR /&gt;&lt;BR /&gt;Thanks.</description>
      <pubDate>Wed, 07 Apr 2004 08:25:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3242385#M173884</guid>
      <dc:creator>SAM_24</dc:creator>
      <dc:date>2004-04-07T08:25:31Z</dc:date>
    </item>
    <item>
      <title>Re: addition</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3242386#M173885</link>
      <description>printf "%.2d\n" ${one}&lt;BR /&gt;&lt;BR /&gt;Anil</description>
      <pubDate>Wed, 07 Apr 2004 08:39:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3242386#M173885</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2004-04-07T08:39:42Z</dc:date>
    </item>
    <item>
      <title>Re: addition</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3242387#M173886</link>
      <description>Well you might output it using "printf" and a format or you could do&lt;BR /&gt; &lt;BR /&gt;[[ $RESULT -le 10 ]] &amp;amp;&amp;amp; $RESULT="0$RESULT"&lt;BR /&gt; &lt;BR /&gt;probably better ways though</description>
      <pubDate>Wed, 07 Apr 2004 08:39:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3242387#M173886</guid>
      <dc:creator>Mark Grant</dc:creator>
      <dc:date>2004-04-07T08:39:46Z</dc:date>
    </item>
    <item>
      <title>Re: addition</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3242388#M173887</link>
      <description>The typeset shell command will do what you want:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;typeset -i10 one=01&lt;BR /&gt;((one += 05))&lt;BR /&gt;echo "One = ${one}"&lt;BR /&gt;# Now let's apply a typeset&lt;BR /&gt;typeset -Z2 one&lt;BR /&gt;echo "Now one = ${one}"&lt;BR /&gt;&lt;BR /&gt;NOTE: You could also apply a typeset for a new variable used only for display:&lt;BR /&gt;typeset -i10 one=01&lt;BR /&gt;((one += 05))&lt;BR /&gt;echo "One = ${one}"&lt;BR /&gt;# Now let's apply a typeset&lt;BR /&gt;typeset -Z2 newone=${one}&lt;BR /&gt;echo "Newone = ${newone}"&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Apr 2004 09:17:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/addition/m-p/3242388#M173887</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-04-07T09:17:03Z</dc:date>
    </item>
  </channel>
</rss>

