<?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 user input in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/user-input/m-p/2629805#M920726</link>
    <description>Hi Folks,&lt;BR /&gt;&lt;BR /&gt;  What is the best to find out the given value/format is O.K. User will input the parameter mins=10,20,30 or mins=10-20 or mins=10 (all of them are acceptable.) and I need to findout that user has not entered garbage. I wrote a program using awk, so I need this check in awk program. Thanks in adv.&lt;BR /&gt;&lt;BR /&gt;Kris</description>
    <pubDate>Tue, 11 Dec 2001 21:41:29 GMT</pubDate>
    <dc:creator>Kris_5</dc:creator>
    <dc:date>2001-12-11T21:41:29Z</dc:date>
    <item>
      <title>user input</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-input/m-p/2629805#M920726</link>
      <description>Hi Folks,&lt;BR /&gt;&lt;BR /&gt;  What is the best to find out the given value/format is O.K. User will input the parameter mins=10,20,30 or mins=10-20 or mins=10 (all of them are acceptable.) and I need to findout that user has not entered garbage. I wrote a program using awk, so I need this check in awk program. Thanks in adv.&lt;BR /&gt;&lt;BR /&gt;Kris</description>
      <pubDate>Tue, 11 Dec 2001 21:41:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-input/m-p/2629805#M920726</guid>
      <dc:creator>Kris_5</dc:creator>
      <dc:date>2001-12-11T21:41:29Z</dc:date>
    </item>
    <item>
      <title>Re: user input</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/user-input/m-p/2629806#M920727</link>
      <description>Here is a sample piece of code. By using arrays in awk, you can parse and test the data.&lt;BR /&gt;&lt;BR /&gt;mins="10,20,30"&lt;BR /&gt;ok=1&lt;BR /&gt;split(mins,ary,",")&lt;BR /&gt;for (xx in ary) {&lt;BR /&gt; split(ary[xx],c,"-")&lt;BR /&gt; for (yy in c) {&lt;BR /&gt;  if (! match(c[yy],"^[0-9]+$")) { ok=0 }&lt;BR /&gt; }&lt;BR /&gt;}&lt;BR /&gt;print ok&lt;BR /&gt;&lt;BR /&gt;The variable "ok" will be 0 if mins is not ok and 1 if mins is ok.&lt;BR /&gt;&lt;BR /&gt;PS: Perl could do this a lot easier...&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;-- Rod Hills&lt;BR /&gt;</description>
      <pubDate>Tue, 11 Dec 2001 23:33:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/user-input/m-p/2629806#M920727</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2001-12-11T23:33:04Z</dc:date>
    </item>
  </channel>
</rss>

