<?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: Simple Arithmatic Function in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-arithmatic-function/m-p/4869726#M707023</link>
    <description>If this is in a script do:&lt;BR /&gt;&lt;BR /&gt;x=$(echo "${i}/${m}" | bc -l)</description>
    <pubDate>Tue, 09 Nov 2004 15:26:40 GMT</pubDate>
    <dc:creator>Patrick Wallek</dc:creator>
    <dc:date>2004-11-09T15:26:40Z</dc:date>
    <item>
      <title>Simple Arithmatic Function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-arithmatic-function/m-p/4869725#M707022</link>
      <description>I'm trying to do:&lt;BR /&gt;&lt;BR /&gt;$i / $m = x&lt;BR /&gt;where i = 205&lt;BR /&gt;m = 400 &lt;BR /&gt;and x should equal .5125.  Problem is everything I've tried gives me x=0.  What am I missing.</description>
      <pubDate>Tue, 09 Nov 2004 15:22:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-arithmatic-function/m-p/4869725#M707022</guid>
      <dc:creator>Scott Frye_1</dc:creator>
      <dc:date>2004-11-09T15:22:05Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Arithmatic Function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-arithmatic-function/m-p/4869726#M707023</link>
      <description>If this is in a script do:&lt;BR /&gt;&lt;BR /&gt;x=$(echo "${i}/${m}" | bc -l)</description>
      <pubDate>Tue, 09 Nov 2004 15:26:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-arithmatic-function/m-p/4869726#M707023</guid>
      <dc:creator>Patrick Wallek</dc:creator>
      <dc:date>2004-11-09T15:26:40Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Arithmatic Function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-arithmatic-function/m-p/4869727#M707024</link>
      <description>The problem is that the shell only does integer arithmetic. Use awk or bc.&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;I=205&lt;BR /&gt;M=400&lt;BR /&gt;RESULT=$(echo "scale=4; ${I} / ${M}" | bc)&lt;BR /&gt;echo "Result = ${RESULT}"&lt;BR /&gt;&lt;BR /&gt;Man bc for details.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 09 Nov 2004 15:27:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-arithmatic-function/m-p/4869727#M707024</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-11-09T15:27:45Z</dc:date>
    </item>
    <item>
      <title>Re: Simple Arithmatic Function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/simple-arithmatic-function/m-p/4869728#M707025</link>
      <description>Works perfectly Patrick.  Thanks!</description>
      <pubDate>Tue, 09 Nov 2004 15:30:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/simple-arithmatic-function/m-p/4869728#M707025</guid>
      <dc:creator>Scott Frye_1</dc:creator>
      <dc:date>2004-11-09T15:30:03Z</dc:date>
    </item>
  </channel>
</rss>

