<?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: Test the result coming from a ksh function in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/test-the-result-coming-from-a-ksh-function/m-p/5281198#M641009</link>
    <description>I' not sure which shell are you using, but in ksh I would implement that if branch this way:&lt;BR /&gt;&lt;BR /&gt;if [ "$X" -le "100" ]; then&lt;BR /&gt;echo "&amp;lt;= 100"&lt;BR /&gt;else&lt;BR /&gt;echo "&amp;gt;100"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;where "-le" stands for "lesser than or equal", see "man test"</description>
    <pubDate>Wed, 04 May 2011 13:48:39 GMT</pubDate>
    <dc:creator>Viktor Balogh</dc:creator>
    <dc:date>2011-05-04T13:48:39Z</dc:date>
    <item>
      <title>Test the result coming from a ksh function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/test-the-result-coming-from-a-ksh-function/m-p/5281197#M641008</link>
      <description>Hi Guys&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Example&lt;BR /&gt;&lt;BR /&gt;function GetFileSize {&lt;BR /&gt;   XX=$(du -m /su01/odb_Local_OracleCRSlogMngt.ksh | awk '{print $1}') &lt;BR /&gt;   return $XX&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;...&lt;BR /&gt;...&lt;BR /&gt;&lt;BR /&gt;        X=$(GetFileSize $i)&lt;BR /&gt;if (( $X &amp;lt;= 100 )) ; then &lt;BR /&gt;  echo "&amp;lt;= 100"&lt;BR /&gt;else&lt;BR /&gt;  echo "&amp;gt;100"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I have a file where I'm sure that size is 500 MB and it never comes as &amp;gt; 100 !&lt;BR /&gt;&lt;BR /&gt;Where is my mistake ?&lt;BR /&gt;&lt;BR /&gt;Bests regards&lt;BR /&gt;Den&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Wed, 04 May 2011 12:40:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/test-the-result-coming-from-a-ksh-function/m-p/5281197#M641008</guid>
      <dc:creator>Leo The Cat</dc:creator>
      <dc:date>2011-05-04T12:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Test the result coming from a ksh function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/test-the-result-coming-from-a-ksh-function/m-p/5281198#M641009</link>
      <description>I' not sure which shell are you using, but in ksh I would implement that if branch this way:&lt;BR /&gt;&lt;BR /&gt;if [ "$X" -le "100" ]; then&lt;BR /&gt;echo "&amp;lt;= 100"&lt;BR /&gt;else&lt;BR /&gt;echo "&amp;gt;100"&lt;BR /&gt;fi&lt;BR /&gt;&lt;BR /&gt;where "-le" stands for "lesser than or equal", see "man test"</description>
      <pubDate>Wed, 04 May 2011 13:48:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/test-the-result-coming-from-a-ksh-function/m-p/5281198#M641009</guid>
      <dc:creator>Viktor Balogh</dc:creator>
      <dc:date>2011-05-04T13:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Test the result coming from a ksh function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/test-the-result-coming-from-a-ksh-function/m-p/5281199#M641010</link>
      <description>;-) My mistake&lt;BR /&gt;&lt;BR /&gt;function GetFileSize {&lt;BR /&gt;XX=$(du -m /su01/odb_Local_OracleCRSlogMngt.ksh | awk '{print $1}') &lt;BR /&gt;return $XX&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;is wrong&lt;BR /&gt;&lt;BR /&gt;function GetFileSize {&lt;BR /&gt;XX=$(du -m $1 | awk '{print $1}') &lt;BR /&gt;return $XX&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Of course, I was scanning always the same files. &lt;BR /&gt;&lt;BR /&gt;Sorry Guys&lt;BR /&gt;Den&lt;BR /&gt;</description>
      <pubDate>Wed, 04 May 2011 14:10:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/test-the-result-coming-from-a-ksh-function/m-p/5281199#M641010</guid>
      <dc:creator>Leo The Cat</dc:creator>
      <dc:date>2011-05-04T14:10:03Z</dc:date>
    </item>
    <item>
      <title>Re: Test the result coming from a ksh function</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/test-the-result-coming-from-a-ksh-function/m-p/5281200#M641011</link>
      <description>Myself. ;-)</description>
      <pubDate>Wed, 04 May 2011 14:10:31 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/test-the-result-coming-from-a-ksh-function/m-p/5281200#M641011</guid>
      <dc:creator>Leo The Cat</dc:creator>
      <dc:date>2011-05-04T14:10:31Z</dc:date>
    </item>
  </channel>
</rss>

