<?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 shell: convert a string to integer in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-shell-convert-a-string-to-integer/m-p/5527681#M640203</link>
    <description>&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so i can convert with your input :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;typeset -i num&amp;nbsp;&lt;/P&gt;&lt;P&gt;var="128.00M"&lt;/P&gt;&lt;P&gt;num=${var%.*}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and i will forget the awk&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2012 15:07:53 GMT</pubDate>
    <dc:creator>support_billa</dc:creator>
    <dc:date>2012-02-03T15:07:53Z</dc:date>
    <item>
      <title>ksh shell: convert a string to integer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-shell-convert-a-string-to-integer/m-p/5516011#M640201</link>
      <description>&lt;P&gt;is there another way to convert a string to a integer in shell (KSH)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;my workaround :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;var="128.00M"&lt;BR /&gt;var=$(&amp;nbsp; echo ${var} | awk '{print int($0) }' )&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2012 14:20:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-shell-convert-a-string-to-integer/m-p/5516011#M640201</guid>
      <dc:creator>support_billa</dc:creator>
      <dc:date>2012-02-01T14:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: ksh shell: convert a string to integer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-shell-convert-a-string-to-integer/m-p/5516515#M640202</link>
      <description>&lt;P&gt;&amp;gt;is there another way to convert a string to a integer in shell (ksh)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That type of string?&amp;nbsp; var="128.00M" is not a numeric value, especially with that "M".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you just want to chop off that "." what follows, you can do:&lt;/P&gt;&lt;P&gt;num=${var%.*}&lt;/P&gt;</description>
      <pubDate>Wed, 01 Feb 2012 22:22:54 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-shell-convert-a-string-to-integer/m-p/5516515#M640202</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2012-02-01T22:22:54Z</dc:date>
    </item>
    <item>
      <title>Re: ksh shell: convert a string to integer</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ksh-shell-convert-a-string-to-integer/m-p/5527681#M640203</link>
      <description>&lt;P&gt;hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so i can convert with your input :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;typeset -i num&amp;nbsp;&lt;/P&gt;&lt;P&gt;var="128.00M"&lt;/P&gt;&lt;P&gt;num=${var%.*}&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and i will forget the awk&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;regards&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2012 15:07:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ksh-shell-convert-a-string-to-integer/m-p/5527681#M640203</guid>
      <dc:creator>support_billa</dc:creator>
      <dc:date>2012-02-03T15:07:53Z</dc:date>
    </item>
  </channel>
</rss>

